-
Notifications
You must be signed in to change notification settings - Fork 572
96 lines (77 loc) · 2.47 KB
/
full-tests-with-coverage.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Tests
on: [push]
jobs:
test:
name: Run tests
strategy:
matrix:
include:
- test-name: ubuntu-20.04-python-2.7
os: ubuntu-20.04
python-version: 2.7
- test-name: ubuntu-18.04-python-3.4
os: ubuntu-18.04
python-version: 3.4
- test-name: ubuntu-20.04-python-3.5
os: ubuntu-20.04
python-version: 3.5
- test-name: ubuntu-20.04-python-3.6
os: ubuntu-20.04
python-version: 3.6
- test-name: ubuntu-20.04-python-3.7
os: ubuntu-20.04
python-version: 3.7
- test-name: ubuntu-20.04-python-3.8
os: ubuntu-20.04
python-version: 3.8
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup go
uses: actions/setup-go@v1
with:
go-version: 1.13
- name: Setup pebble
run: |
export PATH=$PATH:$(go env GOPATH)/bin
go get -u github.com/letsencrypt/pebble/...
cd $GOPATH/src/github.com/letsencrypt/pebble && go install ./...
pebble -h || true
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install virtualenv
pip install -U -r tests/requirements.txt
- name: Run tests with coverage
run: |
export PEBBLE_BIN=$(go env GOPATH)/bin/pebble
coverage run --source . --omit ./setup.py -m unittest tests
- name: Print coverage report
run: coverage report -m
- name: Upload coverage to coveralls.io
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
COVERALLS_SERVICE_NAME: github-actions
COVERALLS_FLAG_NAME: ${{ matrix.test-name }}
COVERALLS_PARALLEL: true
run: |
python -m pip install --upgrade coveralls
coveralls
coveralls:
name: Indicate completion to coveralls.io
needs: test
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python -m pip install --upgrade coveralls
coveralls --service=github --finish