Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update run_tests.yml #68

Merged
merged 1 commit into from
Oct 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,38 @@ permissions:
id-token: write

jobs:

download-history:
runs-on: ubuntu-latest
name: Download history
steps:
- run: >
ARTIFACT_ID=$(curl -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" "https://api.github.com/repos/Train-lab-intern/aqa_python/actions/artifacts?name=reports" | python3 -c "import sys, json; print(json.load(sys.stdin)['artifacts'][0]['id']);")
&&
curl -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/Train-lab-intern/aqa_python/actions/artifacts/$ARTIFACT_ID/zip -o artifacts.zip
&&
REPORT_ID=$(curl -L
-H "Accept: application/vnd.github+json"
-H "X-GitHub-Api-Version: 2022-11-28"
"https://api.github.com/repos/Train-lab-intern/aqa_python/actions/artifacts?name=github-pages"
| python -c "import sys, json; print(json.load(sys.stdin)['artifacts'][0]['id']);")
&&
curl -L
-H "Accept: application/vnd.github+json"
-H "Authorization: Bearer ${{ secrets.TOKEN }}"
-H "X-GitHub-Api-Version: 2022-11-28"
https://api.github.com/repos/Train-lab-intern/aqa_python/actions/artifacts/$REPORT_ID/zip
-o pages.zip
- run: cat artifacts.zip
- run: mkdir reports && unzip artifacts.zip -d reports
- run: mkdir old_pages pages_history && unzip pages.zip -d old_pages && tar -xvf old_pages/artifact.tar -C pages_history
- run: cp pages_history/history/* reports && cp -r pages_history/history reports
- name: Store allure history
uses: actions/upload-artifact@v4
with:
name: reports
path:
reports
retention-days: 5



Expand Down
Loading