-
Notifications
You must be signed in to change notification settings - Fork 42
40 lines (37 loc) · 932 Bytes
/
unit.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
name: DAG Unit Tests
on:
push:
paths:
- 'dags/**'
- 'workflows/unit-test.*.yml'
pull_request:
workflow_dispatch:
defaults:
run:
shell: bash
working-directory: dags
jobs:
unit_tests:
name: Run Unit Tests -- Python 3.${{ matrix.pyver }}
runs-on: ubuntu-latest
strategy:
matrix:
pyver: [8, 9]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.${{ matrix.pyver }}
- name: Install tox
run: pip install tox
- name: Run Tox
run: tox -e py3${{ matrix.pyver }}-unit
- name: Generate Coverage Report
if: matrix.pyver == 9
run: tox -e coverage
- name: Upload Coverage Report
if: matrix.pyver == 9
uses: codecov/codecov-action@v1
with:
files: dags/coverage.xml
flags: unit,gha,python-3.${{ matrix.pyver }}