-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (31 loc) · 1.09 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
name: Test
on: push
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
# Download the repository into the CI runner
# Then, install and activate the newest Python 3 release
- uses: actions/checkout@v4
- name: set up Python
uses: actions/setup-python@v5
with:
# Semantic version range syntax or exact verison of a Python version
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install pytest
run: pip install pytest pytest-cov
- name: Test with pytest
run: pytest ./tests --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
name: pytest-results
path: junit/test-results.xml
# Use always() to always run this step to publish test results.
# Even when there are test failures
if: ${{ always() }}