forked from Rikj000/MoniGoMani
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.3 KB
/
pytest-unit-tests.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
# This workflow is used by test-report.yml
# to bypass a security restriction in GitHub Actions
# which resulted in failing workflows at PR's
# See & read: https://github.com/dorny/test-reporter#README
# This workflow runs only on pull_requests.
name: "CI Pull Request"
on:
pull_request:
branches: [ master, development ]
jobs:
analyze:
name: Unit testing
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip pipenv
pipenv install --dev
- name: Test with pytest
run: |
pipenv run pytest -c pytest.ini tests/
- name: Upload pytest test results
uses: actions/upload-artifact@v2
with:
name: pytest-results
path: tests/junit/test-results.xml
if: ${{ always() }}
# - name: Test Report
# uses: dorny/test-reporter@v1
# if: success() || failure()
# with:
# name: Test Report
# path: tests/junit/test-results*.xml
# reporter: java-junit