Skip to content

Commit

Permalink
Github actions - Publish pytest html report, annotate fails
Browse files Browse the repository at this point in the history
  • Loading branch information
anjensan committed May 11, 2021
1 parent 0807dec commit 5ff603e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:

jobs:
build:

runs-on: ubuntu-latest

steps:
Expand All @@ -20,6 +19,7 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Setup github username
run: |
git config --global user.email "[email protected]"
Expand All @@ -38,6 +38,12 @@ jobs:
run: |
pip install -r requirements.txt
- name: Tests
- name: Run unit tests
run: |
pytest
pytest --html=build/test-report.html --self-contained-html
- name: Upload test report
uses: actions/upload-artifact@v2
with:
name: test-report
path: build/test-report.html
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.pytest.ini_options]
minversion = "6.0"
#addopts = "-ra -q"
testpaths = [
"test",
"bigflow",
]
8 changes: 6 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
-r requirements/log_extras.txt
-r requirements/dataproc_extras.txt
-r requirements/dataflow_extras.txt
pytest
twine
freezegun
pexpect
responses
bs4
bs4

pytest
pytest-html
pytest-cov
pytest-github-actions-annotate-failures

0 comments on commit 5ff603e

Please sign in to comment.