-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (46 loc) · 1.17 KB
/
test.yaml
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
name: Test
on:
push:
branches: [ main]
paths:
- '.github/workflows/test.yaml'
- 'requirements*.txt'
- 'harvest_restrictions.py'
- 'test_harvest_restrictions.py'
pull_request:
branches: [ main ]
paths:
- '.github/workflows/test.yaml'
- 'requirements*.txt'
- 'harvest_restrictions.py'
- 'test_harvest_restrictions.py'
- 'source.schema.json'
- 'sources.json'
jobs:
test:
runs-on: ubuntu-latest
name: test
container: ghcr.io/bcgov/harvest-restrictions:main
services:
postgres:
image: postgis/postgis:16-3.4
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DEBIAN_FRONTEND: noninteractive
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Run tests
run: |
. venv/bin/activate
python -m pytest -v -rxXs
env:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/postgres