Skip to content

Commit

Permalink
Update scrapers_runner.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
RaresCode authored Dec 17, 2023
1 parent 250eba0 commit 659893d
Showing 1 changed file with 29 additions and 18 deletions.
47 changes: 29 additions & 18 deletions .github/workflows/scrapers_runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,45 @@ jobs:
# python3 sites/script_runner.py || true
# echo "Continuing despite potential failure..."

- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'

- name: Download and install Allure Commandline 2.25.0
run: |
curl -o allure-commandline.zip -Ls https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/2.25.0/allure-commandline-2.25.0.zip
unzip allure-commandline.zip -d allure
rm allure-commandline.zip
chmod +x allure/allure-2.25.0/bin/allure
- name: Run pytest with Allure reporting
continue-on-error: true
run: |
pytest -m regression -vv --alluredir=allure-results
- name: Move Allure results to docs folder
pytest -m regression -vv --alluredir=docs/allure-results
- name: Keep previous run history
continue-on-error: true
run: |
rm -rf docs/allure-results
mv -f allure-results docs
cd docs
allure generate --clean allure-results
mv -f allure-report/history allure-results
- name: Generate Allure report
uses: simple-elf/allure-report-action@master
with:
allure_results: docs/allure-results
allure_history: docs/allure-history
keep_reports: 20
run: |
allure/allure-2.25.0/bin/allure generate --single-file --clean
- name: Move Allure results to docs folder
run: |
rm -rf docs/api_test_report.html
mv -f docs/allure-report/index.html docs/api_test_report.html
- name: Commit and push Allure report
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add "docs/allure-results" "docs/allure-history"
git add docs/api_test_report.html docs/allure-results
git commit -m "Add Allure test report"
git push origin main
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs

0 comments on commit 659893d

Please sign in to comment.