-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1 KB
/
test.yml
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
name: tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
pytest:
name: Run linting and tests
runs-on: ubuntu-latest
env:
PDM_BUILD_SCM_VERSION: "1.0.0"
services:
timescaledb:
image: timescale/timescaledb:latest-pg15
env:
POSTGRES_PASSWORD: timescaledb
POSTGRES_USER: timescaledb
POSTGRES_DB: timescaledb
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: pdm-project/setup-pdm@v4
with:
cache: true
python-version: '3.11'
- uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files --show-diff-on-failure
- name: Install dependencies
run: pdm install -x -dG test
- name: Run tests
run: pdm run pytest --cov=dbt
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage.xml