chore(deps): update actions/upload-artifact digest to 5076954 #936
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
STABLE_PYTHON_VERSION: "3.12" | |
PYTEST_ADDOPTS: --color=yes | |
HATCH_VERBOSE: "1" | |
FORCE_COLOR: "1" | |
jobs: | |
complete: | |
name: Test completion check | |
if: always() | |
permissions: | |
contents: none | |
runs-on: ubuntu-latest | |
needs: | |
- test-linux | |
- test-other | |
- example | |
- format | |
- lint | |
- typecheck | |
- spelling | |
- pre-commit | |
steps: | |
- name: Failed | |
run: exit 1 | |
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') | |
test-linux: | |
name: >- | |
Test Python ${{ matrix.python-version }} | |
on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }} | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.experimental }} | |
services: | |
broker: | |
image: pactfoundation/pact-broker:latest@sha256:b5210724579fcb70980821ebe4ccebc847067a67ac35024e84b6b0f933be1091 | |
ports: | |
- "9292:9292" | |
env: | |
# Basic auth credentials for the Broker | |
PACT_BROKER_ALLOW_PUBLIC_READ: "true" | |
PACT_BROKER_BASIC_AUTH_USERNAME: pactbroker | |
PACT_BROKER_BASIC_AUTH_PASSWORD: pactbroker | |
# Database | |
PACT_BROKER_DATABASE_URL: sqlite:////tmp/pact_broker.sqlite | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
experimental: [false] | |
include: | |
- # Run tests against the next Python version, but no need for the full list of OSes. | |
os: ubuntu-latest | |
python-version: "3.13.0-alpha.0 - 3.13" | |
experimental: true | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
with: | |
submodules: true | |
- name: Apply temporary definitions update | |
shell: bash | |
run: | | |
cd tests/v3/compatibility_suite | |
patch -p1 -d definition < definition-update.diff | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
- name: Install Hatch | |
run: pip install --upgrade hatch | |
- name: Ensure broker is live | |
run: | | |
i=0 | |
until curl -sSf http://localhost:9292/diagnostic/status/heartbeat; do | |
i=$((i+1)) | |
if [ $i -gt 120 ]; then | |
echo "Broker failed to start" | |
exit 1 | |
fi | |
sleep 1 | |
done | |
- name: Run tests | |
run: hatch run test --broker-url=http://pactbroker:pactbroker@localhost:9292 --container | |
- name: Upload coverage | |
# TODO: Configure code coverage monitoring | |
if: false && matrix.python-version == env.STABLE_PYTHON_VERSION && matrix.os == 'ubuntu-latest' | |
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
test-other: | |
name: >- | |
Test Python ${{ matrix.python-version }} | |
on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, macos-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
# Python 3.8 and 3.9 aren't supported on macos-latest (ARM) | |
exclude: | |
- os: macos-latest | |
python-version: "3.8" | |
- os: macos-latest | |
python-version: "3.9" | |
include: | |
- os: macos-13 | |
python-version: "3.8" | |
- os: macos-13 | |
python-version: "3.9" | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
with: | |
submodules: true | |
- name: Apply temporary definitions update | |
shell: bash | |
run: | | |
cd tests/v3/compatibility_suite | |
patch -p1 -d definition < definition-update.diff | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
- name: Install Hatch | |
run: pip install --upgrade hatch | |
- name: Run tests | |
run: hatch run test | |
example: | |
name: Example | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' || ! github.event.pull_request.draft | |
services: | |
broker: | |
image: pactfoundation/pact-broker:latest@sha256:b5210724579fcb70980821ebe4ccebc847067a67ac35024e84b6b0f933be1091 | |
ports: | |
- "9292:9292" | |
env: | |
# Basic auth credentials for the Broker | |
PACT_BROKER_ALLOW_PUBLIC_READ: "true" | |
PACT_BROKER_BASIC_AUTH_USERNAME: pactbroker | |
PACT_BROKER_BASIC_AUTH_PASSWORD: pactbroker | |
# Database | |
PACT_BROKER_DATABASE_URL: sqlite:////tmp/pact_broker.sqlite | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Set up Python 3 | |
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5 | |
with: | |
python-version: ${{ env.STABLE_PYTHON_VERSION }} | |
cache: pip | |
- name: Install Hatch | |
run: pip install --upgrade hatch | |
- name: Ensure broker is live | |
run: | | |
i=0 | |
until curl -sSf http://localhost:9292/diagnostic/status/heartbeat; do | |
i=$((i+1)) | |
if [ $i -gt 120 ]; then | |
echo "Broker failed to start" | |
exit 1 | |
fi | |
sleep 1 | |
done | |
- name: Examples | |
run: > | |
hatch run example --broker-url=http://pactbroker:pactbroker@localhost:9292 | |
format: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Set up Python | |
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5 | |
with: | |
python-version: ${{ env.STABLE_PYTHON_VERSION }} | |
cache: pip | |
- name: Install Hatch | |
run: pip install --upgrade hatch | |
- name: Format | |
run: hatch run format | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Set up Python | |
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5 | |
with: | |
python-version: ${{ env.STABLE_PYTHON_VERSION }} | |
cache: pip | |
- name: Install Hatch | |
run: pip install --upgrade hatch | |
- name: Format | |
run: hatch run lint | |
typecheck: | |
name: Typecheck | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Set up Python | |
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5 | |
with: | |
python-version: ${{ env.STABLE_PYTHON_VERSION }} | |
cache: pip | |
- name: Install Hatch | |
run: pip install --upgrade hatch | |
- name: Format | |
run: hatch run typecheck | |
spelling: | |
name: Spell check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Spell Check Repo | |
uses: crate-ci/typos@master | |
pre-commit: | |
name: Pre-commit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Run pre-commit | |
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 |