-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (56 loc) · 1.63 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
name: Python Application CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
actions: read
checks: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Setup virtual environment
run: make setup
- name: Install test dependencies
run: make install-dev
- name: Lint with ruff, reformat-gherkin, and mypy
run: make lint-ci
- name: Run unit and feature tests
run: make test-ci
- name: Create test report
uses: dorny/test-reporter@v1
if: always()
with:
name: Test report
path: "reports/**/*.xml"
reporter: java-junit
list-tests: "failed"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Create test summary
uses: test-summary/action@v2
if: always()
with:
paths: "reports/**/*.xml"
- name: Add coverage to summary
if: always()
run: |
echo "**Test Coverage Summary**" >> $GITHUB_STEP_SUMMARY
echo "```" >> $GITHUB_STEP_SUMMARY
cat reports/coverage_report.txt >> $GITHUB_STEP_SUMMARY
echo "```" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Mypy Coverage Summary**" >> $GITHUB_STEP_SUMMARY
echo "```" >> $GITHUB_STEP_SUMMARY
cat reports/mypy/index.txt >> $GITHUB_STEP_SUMMARY
echo "```" >> $GITHUB_STEP_SUMMARY