-
Notifications
You must be signed in to change notification settings - Fork 6
59 lines (54 loc) · 1.46 KB
/
lint-and-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
50
51
52
53
54
55
56
57
58
59
name: lint-and-test
on: push
jobs:
check:
runs-on: ubuntu-latest
name: Check (on Python3.9)
steps:
- uses: actions/setup-python@v4
with:
python-version: 3.9
- uses: actions/checkout@v3
- uses: pre-commit/[email protected]
test:
needs: check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
py_version: [ '3.7', '3.8', '3.9', '3.10' ]
include:
- py_version: '3.7'
skip-viz: true
name: "Test (on Python ${{ matrix.py_version }})"
steps:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py_version }}
- uses: actions/checkout@v3
- name: Run main tests
run: make test
- name: Run forecast tests
run: make test-forecast
- name: Run viz tests
if: ${{ ! matrix.skip-viz }}
run: make test-viz
env:
PGHOST: 127.0.0.1
PGPORT: 5432
PGUSER: tbtest
PGDB: tbtest
PGPASSWORD: tbtest
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres:12.5
env:
POSTGRES_USER: tbtest
POSTGRES_PASSWORD: tbtest
POSTGRES_DB: tbtest
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5