update github yaml
This commit is contained in:
parent
135cf8ecce
commit
f2cea794f7
|
@ -26,22 +26,53 @@ jobs:
|
|||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.8'
|
||||
allow-prereleases: true
|
||||
cache: 'pipenv'
|
||||
|
||||
- name: Install pipenv
|
||||
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
|
||||
run: pip install pipenv
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pipenv install wheel
|
||||
pipenv install
|
||||
|
||||
- name: Ensure browsers are installed
|
||||
run: pipenv run python -m playwright install
|
||||
|
||||
- name: Run test cases
|
||||
run: pipenv run python run.py
|
||||
run: pipenv run pytest -s --alluredir=temp -m smoke
|
||||
|
||||
- name: Get Allure history # Step to retrieve Allure history
|
||||
uses: actions/checkout@v3
|
||||
if: always() # Execute even if previous steps fail
|
||||
continue-on-error: true # Continue execution even if the step fails
|
||||
with:
|
||||
ref: main # Specify the branch to retrieve Allure history from
|
||||
path: main # Set the destination path for Allure history
|
||||
|
||||
- name: Allure report action # Step to generate Allure report
|
||||
uses: simple-elf/allure-report-action@master
|
||||
if: always() # Execute even if previous steps fail
|
||||
id: report
|
||||
with:
|
||||
allure_results: temp # Specify the directory containing Allure results
|
||||
allure_history: allure-history # Specify the directory to store Allure history
|
||||
keep_reports: 5 # Specify the number of previous reports to keep
|
||||
|
||||
- name: Deploy Allure report to GitHub Pages # Step to deploy Allure report to GitHub Pages
|
||||
if: always() # Execute even if previous steps fail
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }} # Provide the GitHub token for authentication
|
||||
publish_branch: main # Specify the branch to publish the report to
|
||||
publish_dir: allure-history # Specify the directory containing the report
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
|
@ -51,30 +82,5 @@ jobs:
|
|||
*trace.zip
|
||||
|
||||
|
||||
- name: Get Allure history # Step to retrieve Allure history
|
||||
uses: actions/checkout@v3
|
||||
if: always() # Execute even if previous steps fail
|
||||
continue-on-error: true # Continue execution even if the step fails
|
||||
with:
|
||||
ref: gh-pages # Specify the branch to retrieve Allure history from
|
||||
path: gh-pages # Set the destination path for Allure history
|
||||
|
||||
- name: Allure report action # Step to generate Allure report
|
||||
uses: simple-elf/allure-report-action@master
|
||||
if: always() # Execute even if previous steps fail
|
||||
id: report
|
||||
with:
|
||||
allure_results: temp # Specify the directory containing Allure results
|
||||
gh_pages: gh-pages
|
||||
allure_history: allure-history # Specify the directory to store Allure history
|
||||
keep_reports: 5 # Specify the number of previous reports to keep
|
||||
|
||||
- name: Deploy Allure report to GitHub Pages # Step to deploy Allure report to GitHub Pages
|
||||
if: always() # Execute even if previous steps fail
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }} # Provide the GitHub token for authentication
|
||||
publish_branch: gh-pages # Specify the branch to publish the report to
|
||||
publish_dir: allure-history # Specify the directory containing the report
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue