-
Notifications
You must be signed in to change notification settings - Fork 10
72 lines (72 loc) · 1.95 KB
/
ci.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
name: CI
on:
workflow_dispatch:
push:
paths-ignore:
- 'LICENSE'
- 'README.md'
pull_request:
paths-ignore:
- 'LICENSE'
- 'README.md'
jobs:
Baseline:
strategy:
fail-fast: false
matrix:
# Ubuntu 20.04 python3 = 3.8
# Ubuntu 22.04 python3 = 3.10
os: [ubuntu-20.04, ubuntu-latest]
py: [python3.7, python3.9, python3]
runs-on: ${{ matrix.os }}
env:
PYTHON: ${{ matrix.py }}
steps:
- uses: actions/checkout@v2
- name: Install deps
run: |
sudo add-apt-repository ppa:deadsnakes/ppa
scripts/install-deps.sh
- name: Install pipenv
run: |
${{ matrix.py }} -m pip install pipenv
pipenv install --dev
- name: Run tests
run: pipenv run pytest test/
Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install deps
run: |
python3 -m pip install pipenv
pipenv install --dev
scripts/install-deps.sh
- name: flake8
run: pipenv run flake8
- name: pylint
run: |
pipenv run pylint src test
pipenv run pylint -d duplicate-code,invalid-name test/templates/*.py
Coverage:
needs: [Lint, Baseline]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install deps
run: |
python3 -m pip install pipenv
pipenv install --dev
scripts/install-deps.sh
# Install packages to system python because that will be used by GDB.
# This is needed so we get correct coverage report when testing GDB
# integration. Otherwise Python code executed by GDB integration does
# not get calculated as covered.
pipenv run pip freeze > requirements.txt
pip3 install -r requirements.txt
- name: Run tests
run: pipenv run pytest --cov-report xml --cov=src test/
- name: Codecov
uses: codecov/codecov-action@v2
with:
files: ./coverage.xml