-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 1.26 KB
/
test.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
name: Test
on:
push:
jobs:
test:
permissions:
contents: read # for actions/checkout to fetch code
name: Test
runs-on: "ubuntu-22.04"
steps:
- name: Checkout
id: checkout
# from https://github.com/actions/checkout/commits/main
uses: actions/checkout@1f9a0c22da41e6ebfa534300ef656657ea2c6707
with:
persist-credentials: false
fetch-depth: 0
# from https://github.com/palewire/install-python-pipenv-pipfile/commits/main
- name: Install Python, pipenv and Pipfile packages
uses: palewire/install-python-pipenv-pipfile@fae3f6a0c5e68b98df1a416a3bf3f567db461251
with:
python-version: '3.9'
- name: Install library
run: |
pipenv run install_local
- name: Run tests
run: |
pipenv run coverage run -m pytest
- name: Generate report
run: |
pipenv run coverage report
- name: Generate HTML report
run: |
pipenv run coverage html
- name: Upload HTML report
# from https://github.com/actions/upload-artifact/commits/main
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb
with:
name: coverage_html
path: htmlcov