Skip to content

Commit 630ce0a

Browse files
committed
Merge branch 'master' of https://github.com/sw360/sw360python
2 parents 544cf3d + d2b2ba4 commit 630ce0a

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/unit-test.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This workflow will install all necessary Python dependencies and run the unit tests
2+
3+
name: Unit tests
4+
5+
on:
6+
push:
7+
branches: [ main ]
8+
pull_request:
9+
branches: [ main ]
10+
11+
jobs:
12+
build:
13+
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version: [3.8]
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install pytest coverage codecov
30+
31+
- name: Test with pytest
32+
run: |
33+
# run tests with coverage and pytest
34+
coverage run -m pytest
35+
coverage report -m --omit "*/site-packages/*.py"
36+
coverage html --omit "*/site-packages/*.py"
37+
# codecov -t ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)