Various halfbaked bits #125
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: CI | |
on: pull_request | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Test -- ${{ matrix.testenv }} | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
testenv: | |
- django | |
- django-multilingual | |
- geodjango | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Install Ubuntu packages | |
run: | | |
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | |
libgdal26 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
cache: 'pip' | |
cache-dependency-path: 'requirements/*.txt' | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Configure Postgres (for faster tests) | |
env: | |
PGHOST: localhost | |
PGUSER: postgres | |
PGPASSWORD: password | |
run: | | |
psql -c "ALTER SYSTEM SET fsync=off;" | |
psql -c "ALTER SYSTEM SET full_page_writes=off;" | |
psql -c "SELECT pg_reload_conf();" | |
- name: Run tests | |
env: | |
PGHOST: localhost | |
PGUSER: postgres | |
PGPASSWORD: password | |
TOX_TESTENV_PASSENV: "TOX_TESTENV_PASSENV PG*" | |
TOX_OVERRIDE: "testenv.pass_env=TOX_TESTENV_PASSENV,PG*" | |
run: | | |
pip install $(grep -E "^(tox|tox-uv)==" requirements/local.txt) | |
tox -e ${{ matrix.testenv }} | |
services: | |
postgres: | |
image: postgis/postgis:12-3.3 | |
env: | |
POSTGRES_PASSWORD: password | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 |