-
Notifications
You must be signed in to change notification settings - Fork 20
52 lines (45 loc) · 1.23 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
name: Testing
on:
push:
branches: ["*"]
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
tags-ignore: ["*"]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
container:
image: python:${{ matrix.python }}-alpine
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Setup environment
run: apk --update add gcc libpq make musl-dev linux-headers alpine-conf
- name: Set the timezone
run: setup-timezone -z America/New_York
- name: Install testing dependencies
run: pip3 install -e '.[testing]'
- name: Create build directory
run: mkdir build
- name: Run flake8 tests
run: flake8 --output build/flake8.txt --tee
- name: Run tests
run: coverage run && coverage report && coverage xml
- name: Upload Coverage
uses: codecov/codecov-action@v1.0.2
if: github.event_name == 'push' && github.repository == 'gmr/pamqp'
with:
token: ${{secrets.CODECOV_TOKEN}}
file: build/coverage.xml
flags: unittests