Skip to content

Commit fb1e973

Browse files
committed
update actiomns test
1 parent 10d9da7 commit fb1e973

2 files changed

Lines changed: 69 additions & 72 deletions

File tree

.github/workflows/actions-test.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,22 @@ jobs:
3535
poetry run playwright install --with-deps
3636
3737
- name: 🧪 Run playwright test and generate report using marketplace plugin
38-
uses: reporterplus/pytest-html-plus-action@v2
38+
uses: reporterplus/pytest-html-plus-action@v4
3939
with:
4040
htmloutput: "report_output_playwright"
4141
capturescreenshots: "all"
4242
testpath: "tests/browser/test_playwright.py"
4343
usepoetry: "true"
4444
xmlreport: "report.xml"
4545
gitbranch: "$(git rev-parse --abbrev-ref HEAD)"
46-
47-
- name: Upload reports
48-
if: always()
49-
uses: actions/upload-artifact@v4
50-
with:
51-
name: reports-${{ github.job }}-${{ github.run_number }}-${{ matrix.python-version }}
52-
path: |
53-
report_output_playwright/
46+
publish_github_summary: ${{ secrets.GITHUB_TOKEN }}
47+
48+
49+
# - name: Upload reports
50+
# if: always()
51+
# uses: actions/upload-artifact@v4
52+
# with:
53+
# name: reports-${{ github.job }}-${{ github.run_number }}-${{ matrix.python-version }}
54+
# path: |
55+
# report_output_playwright/
5456

.github/workflows/unit-test.yml

Lines changed: 58 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -51,67 +51,62 @@ jobs:
5151
- name: 🔍 Lint with ruff
5252
run: poetry run ruff check .
5353

54-
# - name: 🧪 Run tests with coverage
55-
# run: |
56-
# export REPORT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
57-
# export REPORT_COMMIT="$(git rev-parse HEAD)"
58-
# poetry run pytest \
59-
# --cov=pytest_html_plus \
60-
# --cov-fail-under=75 \
61-
# --cov-report=term \
62-
# --cov-report=xml:coverage.xml \
63-
# --reruns 1 \
64-
# --ignore=tests/browser \
65-
# --generate-xml \
66-
# --xml-report final_xml_ubuntu.xml \
67-
# --git-branch "$REPORT_BRANCH" \
68-
# --git-commit "$REPORT_COMMIT" \
69-
# tests/
70-
71-
# - name: ☂️ Upload coverage to Codecov
72-
# if: matrix.python-version == '3.12'
73-
# uses: codecov/codecov-action@v4
74-
# with:
75-
# files: ./coverage.xml
76-
# flags: unittests
77-
# name: codecov-pytest-html-plus
78-
# token: ${{ secrets.CODECOV_TOKEN }}
79-
# fail_ci_if_error: false
80-
# verbose: true
81-
82-
# - name: 🧪 Run tests with warnings enabled
83-
# run: |
84-
# export REPORT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
85-
# export REPORT_COMMIT="$(git rev-parse HEAD)"
86-
# PYTHONWARNINGS=error poetry run pytest \
87-
# --cov=pytest_html_plus \
88-
# --cov-fail-under=39 \
89-
# --cov-report=term \
90-
# --reruns 1 \
91-
# --ignore=tests/browser \
92-
# --generate-xml \
93-
# --xml-report final_xml_ubuntu_warnings.xml \
94-
# --html-output=report_output_warnings \
95-
# --git-branch "$REPORT_BRANCH" \
96-
# --git-commit "$REPORT_COMMIT" \
97-
# tests/
98-
99-
100-
- name: Run pytest-html-plus-action
101-
uses: reporterplus/pytest-html-plus-action@v4
54+
- name: 🧪 Run tests with coverage
55+
run: |
56+
export REPORT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
57+
export REPORT_COMMIT="$(git rev-parse HEAD)"
58+
poetry run pytest \
59+
--cov=pytest_html_plus \
60+
--cov-fail-under=75 \
61+
--cov-report=term \
62+
--cov-report=xml:coverage.xml \
63+
--reruns 1 \
64+
--ignore=tests/browser \
65+
--generate-xml \
66+
--xml-report final_xml_ubuntu.xml \
67+
--git-branch "$REPORT_BRANCH" \
68+
--git-commit "$REPORT_COMMIT" \
69+
tests/
70+
71+
- name: ☂️ Upload coverage to Codecov
72+
if: matrix.python-version == '3.12'
73+
uses: codecov/codecov-action@v4
74+
with:
75+
files: ./coverage.xml
76+
flags: unittests
77+
name: codecov-pytest-html-plus
78+
token: ${{ secrets.CODECOV_TOKEN }}
79+
fail_ci_if_error: false
80+
verbose: true
81+
82+
- name: 🧪 Run tests with warnings enabled
83+
run: |
84+
export REPORT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
85+
export REPORT_COMMIT="$(git rev-parse HEAD)"
86+
PYTHONWARNINGS=error poetry run pytest \
87+
--cov=pytest_html_plus \
88+
--cov-fail-under=39 \
89+
--cov-report=term \
90+
--reruns 1 \
91+
--ignore=tests/browser \
92+
--generate-xml \
93+
--xml-report final_xml_ubuntu_warnings.xml \
94+
--html-output=report_output_warnings \
95+
--git-branch "$REPORT_BRANCH" \
96+
--git-commit "$REPORT_COMMIT" \
97+
tests/
98+
99+
100+
- name: 📤 Upload HTML Report
101+
if: always()
102+
uses: actions/upload-artifact@v4
103+
with:
104+
name: report-${{ github.job }}-${{ github.run_number }}-${{ matrix.python-version }}
105+
path: report_output/
106+
107+
- name: 📤 Upload HTML Warnings Report
108+
if: always()
109+
uses: actions/upload-artifact@v4
102110
with:
103-
publish_github_summary: ${{ secrets.GITHUB_TOKEN }}
104-
105-
# - name: 📤 Upload HTML Report
106-
# if: always()
107-
# uses: actions/upload-artifact@v4
108-
# with:
109-
# name: report-${{ github.job }}-${{ github.run_number }}-${{ matrix.python-version }}
110-
# path: report_output/
111-
112-
# - name: 📤 Upload HTML Warnings Report
113-
# if: always()
114-
# uses: actions/upload-artifact@v4
115-
# with:
116-
# name: report-warnings-${{ github.job }}-${{ github.run_number }}-${{ matrix.python-version }}
117-
# path: report_output_warnings/
111+
name: report-warnings-${{ github.job }}-${{ github.run_number }}-${{ matrix.python-version }}
112+
path: report_output_warnings/

0 commit comments

Comments
 (0)