-
Notifications
You must be signed in to change notification settings - Fork 67
63 lines (59 loc) · 1.86 KB
/
test-build.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
name: mfr_ci_testing
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-20.04
env:
GHA_DISTRO: ubuntu-20.04
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
matrix:
python-version: [3.6]
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache Build Requirements
id: pip-cache-step
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.GHA_DISTRO }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt', 'dev-requirements.txt') }}
- name: install dependencies
if: steps.pip-cache-step.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt
runtests:
name: Run unit tests
needs: build
runs-on: ubuntu-20.04
env:
GHA_DISTRO: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Cache pip
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.GHA_DISTRO }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt', 'dev-requirements.txt') }}
- name: run syntax checks
run: |
flake8 .
- name: build plugins
run: |
python setup.py develop
- name: run unit tests
run: |
py.test --cov-report term-missing --cov mfr tests
- name: Upload coverage data to coveralls.io
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}