File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010# https://github.com/orgs/community/discussions/26276
1111
1212jobs :
13- check :
13+ lint :
1414 runs-on : ubuntu-latest
1515 strategy :
1616 matrix :
1717 python-version :
1818 - " 3.9"
19- - " 3.10"
2019 - " 3.11"
2120
2221 steps :
3332 run : poetry install --all-extras
3433 - name : Lint code
3534 run : pre-commit run --all-files
35+
36+
37+ run-tests :
38+ runs-on : ubuntu-latest
39+ strategy :
40+ matrix :
41+ python-version :
42+ - " 3.9"
43+ - " 3.10"
44+ - " 3.11"
45+ db-url :
46+ - " sqlite+aiosqlite:///./db.sqlite3"
47+ - " postgresql+asyncpg://postgres:postgres@postgres:5432/postgres"
48+
49+ # Service containers to run with `container-job`
50+ services :
51+ # Label used to access the service container
52+ postgres :
53+ # Docker Hub image
54+ image : postgres
55+ # Provide the password for postgres
56+ env :
57+ POSTGRES_PASSWORD : postgres
58+ # Set health checks to wait until postgres has started
59+ options : >-
60+ --health-cmd pg_isready
61+ --health-interval 10s
62+ --health-timeout 5s
63+ --health-retries 5
64+
65+ steps :
66+ - uses : actions/checkout@v3
67+ - name : Set up Python ${{ matrix.python-version }}
68+ uses : actions/setup-python@v4
69+ with :
70+ python-version : ${{ matrix.python-version }}
71+ - name : Install poetry
72+ run : |
73+ python -m pip install --upgrade pip poetry pre-commit
74+ poetry config virtualenvs.create false --local
75+ - name : Install dependencies
76+ run : poetry install --all-extras
3677 - name : Test with pytest
3778 run : pytest -s -vv tests/
79+ env :
80+ TESTING_DB_URL : ${{ matrix.db-url }}
You can’t perform that action at this time.
0 commit comments