Run tests against DBs other than Postgres #266
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 | |
| MARIADB_USER: subatomic | |
| MARIADB_PASSWORD: subatomicpassword | |
| 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://subatomic:subatomicpassword@localhost/subatomic | |
| OTHER_MARIADB_URL: mysql://subatomic:subatomicpassword@localhost/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 |