-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.34 KB
/
Copy pathtests.yml
File metadata and controls
54 lines (44 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Tests
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: analytics
POSTGRES_USER: analytics_user
POSTGRES_PASSWORD: analytics_dev_password
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U analytics_user -d analytics"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: python -m pip install -r requirements.txt
- name: Run tests
run: python -m pytest -q
- name: Run PostgreSQL import integration test
env:
DATABASE_URL: postgresql+psycopg://analytics_user:analytics_dev_password@localhost:5432/analytics
run: python -m pytest -q tests/test_postgres_integration.py
- name: Refresh data-quality report
run: python src/run_pipeline.py
- name: Upload data-quality report
if: always()
uses: actions/upload-artifact@v4
with:
name: data-quality-report
path: reports/data_quality_report.json