File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Python testing
2+
3+ on :
4+ push :
5+ # pull_request:
6+
7+ # is there a way to fix doubled pipelines?
8+ # only XXX
9+ # https://github.com/orgs/community/discussions/25654
10+ # https://github.com/orgs/community/discussions/26276
11+
12+ jobs :
13+
14+ run-tests :
15+ runs-on : ubuntu-latest
16+ strategy :
17+ matrix :
18+ python-version :
19+ - " 3.11"
20+ db-url :
21+ - " postgresql+asyncpg://user:passwd@postgres:5432/app"
22+
23+ # Service containers to run with `container-job`
24+ services :
25+ # Label used to access the service container
26+ postgres :
27+ # Docker Hub image
28+ image : postgres
29+ # Provide the password for postgres
30+ env :
31+ POSTGRES_USER : user
32+ POSTGRES_PASSWORD : passwd
33+ POSTGRES_DB : app
34+ # Set health checks to wait until postgres has started
35+ options : >-
36+ --health-cmd pg_isready
37+ --health-interval 10s
38+ --health-timeout 5s
39+ --health-retries 5
40+
41+ steps :
42+ - uses : actions/checkout@v3
43+ - name : Set up Python ${{ matrix.python-version }}
44+ uses : actions/setup-python@v4
45+ with :
46+ python-version : ${{ matrix.python-version }}
47+ - name : Install poetry
48+ run : |
49+ python -m pip install --upgrade pip poetry pre-commit
50+ poetry config virtualenvs.create false --local
51+ - name : Install dependencies
52+ run : poetry install --all-extras
53+ - name : Test with pytest
54+ run : pytest -s -vv tests/
55+ env :
56+ TESTING_DB_URL : ${{ matrix.db-url }}
Original file line number Diff line number Diff line change 4444 - " 3.11"
4545 db-url :
4646 - " sqlite+aiosqlite:///./db.sqlite3"
47- - " postgresql+asyncpg://user:passwd@postgres:5432/app"
47+ # - "postgresql+asyncpg://user:passwd@postgres:5432/app"
4848
4949 # Service containers to run with `container-job`
5050 services :
You can’t perform that action at this time.
0 commit comments