Skip to content

Commit 7c273b5

Browse files
authored
ci: Allure integration for tests (#247)
1 parent eea66b1 commit 7c273b5

File tree

4 files changed

+33
-4
lines changed

4 files changed

+33
-4
lines changed

.github/workflows/integration-tests.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,19 @@ jobs:
5858
API_ENDPOINT: "api.dev.firebolt.io"
5959
ACCOUNT_NAME: "firebolt"
6060
run: |
61-
pytest -n 6 --dist loadgroup --timeout_method "signal" -o log_cli=true -o log_cli_level=INFO tests/integration
62-
61+
pytest -n 6 --dist loadgroup --timeout_method "signal" -o log_cli=true -o log_cli_level=INFO tests/integration --alluredir=allure-results
62+
63+
- name: Get Allure history
64+
uses: actions/checkout@v2
65+
if: always()
66+
continue-on-error: true
67+
with:
68+
ref: gh-pages
69+
path: gh-pages
70+
71+
- name: Allure Report
72+
uses: firebolt-db/action-allure-report@v1
73+
if: always()
74+
with:
75+
github-key: ${{ secrets.GITHUB_TOKEN }}
76+
test-type: integration

.github/workflows/unit-tests.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,22 @@ jobs:
3939
4040
- name: Run unit tests
4141
run: |
42-
pytest --cov=src/ tests/unit --cov-report=xml
42+
pytest --cov=src/ tests/unit --cov-report=xml --alluredir=allure-results
4343
44+
- name: Get Allure history
45+
uses: actions/checkout@v2
46+
if: always()
47+
continue-on-error: true
48+
with:
49+
ref: gh-pages
50+
path: gh-pages
51+
52+
- name: Allure Report
53+
uses: firebolt-db/action-allure-report@v1
54+
if: always()
55+
with:
56+
github-key: ${{ secrets.GITHUB_TOKEN }}
57+
4458
- name: Upload coverage report
4559
uses: actions/upload-artifact@v2
4660
with:

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ where = src
4545
ciso8601 =
4646
ciso8601==2.2.0
4747
dev =
48+
allure-pytest==2.*
4849
devtools==0.7.0
4950
mypy==0.910
5051
pre-commit==2.15.0

tests/unit/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def global_fake_fs(request) -> None:
4747
if "nofakefs" in request.keywords:
4848
yield
4949
else:
50-
with Patcher():
50+
with Patcher(additional_skip_names=["logger", "allure-pytest"]):
5151
yield
5252

5353

0 commit comments

Comments
 (0)