Ensure after-commit behaviour is explicit in tests #299
Workflow file for this run
This file contains hidden or 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 | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| # Only allow one instance of this workflow for each PR. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref_name }} | |
| cancel-in-progress: true | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| services: | |
| mariadb: | |
| image: mariadb | |
| env: | |
| MARIADB_ROOT_PASSWORD: rootpassword | |
| MARIADB_DATABASE: subatomic | |
| options: >- | |
| --health-cmd "mariadb-check --all-databases -h 127.0.0.1 -u root -p'rootpassword'" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 3306:3306 | |
| postgres: | |
| image: postgres | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: | | |
| 3.12 | |
| 3.13 | |
| 3.14 | |
| allow-prereleases: true | |
| cache: 'pip' | |
| cache-dependency-path: | | |
| pyproject.toml | |
| tox.ini | |
| - run: pip install --group test_runners | |
| - run: tox run-parallel --parallel-no-spinner | |
| env: | |
| FORCE_COLOR: "1" | |
| DEFAULT_POSTGRES_URL: postgres://postgres:postgres@localhost/subatomic | |
| OTHER_POSTGRES_URL: postgres://postgres:postgres@localhost/subatomic_other | |
| DEFAULT_MARIADB_URL: mysql://root:rootpassword@127.0.0.1:3306/subatomic | |
| OTHER_MARIADB_URL: mysql://root:rootpassword@127.0.0.1:3306/subatomic_other | |
| docs: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: '.github/workflows/.python-version' | |
| - run: pip install --group docs . | |
| - run: mkdocs build --strict | |
| validate_commits: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| # Only check commits on PR branches, where they can be changed. | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| fetch-depth: 0 | |
| - run: | | |
| git fetch origin main | |
| git branch main origin/main | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: '.github/workflows/.python-version' | |
| - run: pip install validate_commits | |
| - run: validate-commits |