Bump codecov/codecov-action from 3 to 4 #118
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: Tests | |
permissions: | |
id-token: write | |
contents: read | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# Allow job to be triggered manually. | |
workflow_dispatch: | |
# Cancel in-progress jobs when pushing to the same branch. | |
concurrency: | |
cancel-in-progress: true | |
group: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
integration-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.10", "3.11"] | |
include: | |
- os: "macos-latest" | |
python-version: "3.11" | |
- os: "windows-latest" | |
python-version: "3.11" | |
defaults: | |
run: | |
shell: bash | |
name: Python ${{ matrix.python-version }} on OS ${{ matrix.os }} | |
steps: | |
- name: Acquire sources | |
uses: actions/checkout@v4 | |
- name: Google Auth | |
uses: google-github-actions/auth@v1 | |
with: | |
workload_identity_provider: ${{ secrets.GOOGLE_IDENTITY_PROVIDER }} | |
service_account: bquest-sa@${{ secrets.GOOGLE_PROJECT_ID }}.iam.gserviceaccount.com | |
project_id: ${{ secrets.GOOGLE_PROJECT_ID }} | |
- name: Setup Poetry | |
run: pipx install poetry | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
cache: poetry | |
- name: Install project | |
run: poetry install --no-interaction --no-root --with=dev,test | |
- name: Unit tests | |
run: poetry run pytest -m unit | |
- name: Integration tests | |
if: ${{ ! github.event.pull_request.head.repo.fork }} | |
run: poetry run pytest -m integration || [[ $? -eq 5 ]] # allow zero pytest tests if not authed with Google Cloud |