-
Notifications
You must be signed in to change notification settings - Fork 10
62 lines (54 loc) · 1.58 KB
/
run-tests.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
name: Unittests
on:
push:
permissions:
id-token: write
contents: read # read is required for actions/checkout
jobs:
tests:
name: Run all unittests
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install python dependencies
run: poetry install --with plotting,test
- name: Install queueing-tool
env:
CFLAGS: "-coverage"
run: |
source $(poetry env info --path)/bin/activate
pip install -e .
- name: Run tests
env:
CI_TEST: true
run: |
source $(poetry env info --path)/bin/activate
pytest --cov=queueing_tool --cov-report=lcov:lcov.info --cov-report=term-missing --doctest-modules --verbose
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: lcov.info
flag-name: run-python-${{ matrix.python-version }}
parallel: true
coverage:
needs: tests
runs-on: ubuntu-20.04
steps:
- name: Submit code coverage to coveralls.io
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: lcov.info
parallel-finished: true