Skip to content

Commit aae40f9

Browse files
committed
separate ci for pg testing
1 parent acc704c commit aae40f9

2 files changed

Lines changed: 57 additions & 1 deletion

File tree

.github/workflows/pg-testing.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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 }}

.github/workflows/testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
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:

0 commit comments

Comments
 (0)