File tree Expand file tree Collapse file tree 2 files changed +18
-14
lines changed
Expand file tree Collapse file tree 2 files changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -21,19 +21,21 @@ jobs:
2121 run : |
2222 python -m pip install --upgrade pip
2323 pip install -r requirements.txt
24- pip install pytest-sugar
25- pip install pytest-html
24+ pip install allure-pytest
2625 pip install playwright
2726 playwright install
28- - name : Run tests
27+
28+ - name : Install Allure CLI
2929 run : |
30- if [ -z "${{ github.event.inputs.test_class }}" ]; then
31- pytest --maxfail=1 --disable-warnings -q --html=report.html --self-contained-html
32- else
33- pytest ${{ github.event.inputs.test_class }} --maxfail=1 --disable-warnings -q --html=report.html --self-contained-html
34- fi
35- - name : Upload test report
36- uses : actions/upload-artifact@v2
30+ wget -qO- https://github.com/allure-framework/allure2/releases/latest/download/allure-2.21.0.zip > allure.zip
31+ unzip allure.zip -d allure
32+ sudo ln -s $PWD/allure/bin/allure /usr/bin/allure
33+
34+ - name : Run tests and generate Allure report
35+ run : ./your-test-script.sh
36+
37+ - name : Upload Allure Report
38+ uses : actions/upload-artifact@v3
3739 with :
38- name : test -report
39- path : report.html
40+ name : allure -report
41+ path : allure- report
Original file line number Diff line number Diff line change 22DEBUG=${DEBUG:- 0}
33ALLURE=${ALLURE:- 1}
44
5- rm -rf allure-results
5+ rm -rf allure-results allure-report
66
77if [ " $DEBUG " -eq 1 ]; then
88 export PWDEBUG=1
@@ -12,5 +12,7 @@ python -m pytest --alluredir=allure-results "$@"
1212
1313if [ " $ALLURE " -eq 1 ]; then
1414 allure generate allure-results -o allure-report --clean
15- allure open allure-report
15+ if [ -z " $CI " ]; then
16+ allure open allure-report
17+ fi
1618fi
You can’t perform that action at this time.
0 commit comments