Use Py 3.12 for code check #467
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: Python CI | |
on: push | |
jobs: | |
test: | |
# For example of update to 22.04, see station-data-portal-backend | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python-version: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install system-level dependencies | |
run: | | |
# Add postgres package repo; see https://wiki.postgresql.org/wiki/Apt | |
sudo apt-get install curl ca-certificates gnupg | |
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' | |
sudo apt-get update | |
sudo apt-get install postgresql-plpython3-14 postgresql-14-postgis-3 | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
- name: Install dependencies | |
run: | | |
poetry install | |
- name: Test with pytest (full) | |
if: github.ref == 'refs/heads/master' | |
env: | |
PYCDS_SCHEMA_NAME: other | |
run: | | |
poetry run pytest -v --tb=short tests | |
- name: Test with pytest (fast) | |
if: github.ref != 'refs/heads/master' | |
env: | |
PYCDS_SCHEMA_NAME: other | |
run: | | |
poetry run pytest -m "not slow" -v --tb=short tests | |