-
Notifications
You must be signed in to change notification settings - Fork 4
61 lines (54 loc) · 1.52 KB
/
testing.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Testing
on:
pull_request:
push:
branches: ["*"]
paths-ignore:
- 'docs/**'
- 'setup.*'
- '*.md'
- '*.rst'
tags-ignore: ["*"]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:${{ matrix.postgres }}
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432
strategy:
fail-fast: false
matrix:
python: [3.7, 3.8, 3.9]
postgres: [11, 12, 13]
container:
image: python:${{ matrix.python }}-alpine
env:
POSTGRES_URI: postgresql://postgres@postgres:5432/postgres
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Setup environment
run: apk --update add gcc bash libffi-dev libpq make musl-dev postgresql postgresql-dev linux-headers tzdata --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
- name: Install testing dependencies
run: pip3 install -r requires/testing.txt
- name: Setup test/fixture data
run: ci/test-setup.sh
- name: Install library dependencies
run: python setup.py develop
- name: Run flake8 tests
run: flake8 --output build/flake8.txt --tee
- name: Run tests
run: nosetests -x
- name: Upload Coverage
uses: codecov/codecov-action@v1
with:
file: build/coverage.xml