Skip to content

copier

copier #41

Workflow file for this run

name: CI
on:
push:
branches-ignore:
- 'gh-readonly-queue/**' # don't run (again) when on these special branches created during merge groups; the `on: merge_group` already triggers it.
merge_group:
env:
PYTHONUNBUFFERED: True
PRE_COMMIT_HOME: ${{ github.workspace }}/.precommit_cache
permissions:
id-token: write
contents: write # needed for mutex, and updating dependabot branches
statuses: write # needed for updating status on Dependabot PRs
jobs:
get-values:
uses: ./.github/workflows/get-values.yaml
lint:
needs: [ get-values ]
name: Pre-commit
uses: ./.github/workflows/pre-commit.yaml
with:
python-version: 3.12.7
test:
needs: [ lint ]
strategy:
matrix:
os:
- "ubuntu-24.04"
python-version:
- 3.12.7
- 3.13.2
include:
- os: "ubuntu-24.04"
python-version: "3.12.7"
JOB_MATCHING_DEV_ENV: true
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Install python tooling
uses: ./.github/actions/install_deps
with:
python-version: ${{ matrix.python-version }}
- name: Unit test
run: uv run pytest tests/unit --cov-report=xml --durations=5
- name: Upload coverage to Codecov
# only upload coverage from fastest job
if: ${{ matrix.JOB_MATCHING_DEV_ENV && github.actor != 'dependabot[bot]' }} # dependabot by default doesn't have access to the necessary secret...and dependabot should never be changing coverage anyway so it's fine not uploading it
uses: codecov/[email protected]
with:
files: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
slug: LabAutomationAndScreening/ephemeral-pulumi-deploy
required-check:
runs-on: ubuntu-24.04
needs:
- test
- get-values
if: always()
steps:
- name: fail if prior job failure
if: needs.test.result != 'success'
run: |
exit 1
- name: Mark updated Dependabot commit of devcontainer hash as succeeded
if: needs.get-values.outputs.dependabot-commit-created == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api \
-X POST -H "Accept: application/vnd.github.v3+json" \
"/repos/${{ github.repository }}/statuses/${{ needs.get-values.outputs.new-dependabot-sha }}" \
-f state=success -f context="required-check" -f description="Initial CI run passed" \
-f target_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"