clear branch

This commit is contained in:
shao.xiaoping 2024-01-29 19:58:11 +08:00
parent c7a724cdc0
commit 03160aef06
1 changed files with 36 additions and 39 deletions

View File

@ -21,62 +21,59 @@ jobs:
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.8' python-version: '3.8'
allow-prereleases: true allow-prereleases: true
cache: 'pipenv' cache: 'pipenv'
- name: Install pipenv - name: Install pipenv
run: pip install pipenv run: pip install pipenv
- name: Install dependencies - name: Install dependencies
run: | run: |
pipenv install wheel pipenv install wheel
pipenv install pipenv install
- name: Ensure browsers are installed - name: Ensure browsers are installed
run: pipenv run python -m playwright install run: pipenv run python -m playwright install
- name: Run test cases - name: Run test cases
run: pipenv run python run.py run: pipenv run python run.py
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-traces_and_results
# 跑完的allure测试结果是放在项目report目录下的
path: |
report/
*trace.zip
# - uses: actions/upload-artifact@master - uses: actions/upload-artifact@master
# with: with:
# name: Test-allure-report name: Test-allure-report
# path: report # upload the latest report file path: report # path to store the allure report
# retention-days: 20 retention-days: 20
#
# - name: Get Allure history # Step to retrieve Allure history - name: Get Allure history # Step to retrieve Allure history
# uses: actions/checkout@v4 uses: actions/checkout@v4
# if: always() # Execute even if previous steps fail if: always() # Execute even if previous steps fail
# continue-on-error: true # Continue execution even if the step fails continue-on-error: true # Continue execution even if the step fails
# with: with:
# ref: gh-pages # Specify the branch to retrieve Allure history from ref: gh-pages # Specify the branch to retrieve Allure history from
# path: gh-pages # Set the destination path for Allure history path: gh-pages # Set the destination path for Allure history
#
# - name: Generate allure report action # Step to generate Allure report - name: Generate allure report action # Step to generate Allure report
# uses: simple-elf/allure-report-action@master uses: simple-elf/allure-report-action@master
# if: always() # Execute even if previous steps fail if: always() # Execute even if previous steps fail
# id: allure-report id: allure-report
# with: with:
# allure_results: temp # Specify the directory containing Allure results allure_results: temp # path to store the allure results
# allure_history: allure-history # Specify the directory to store Allure history allure_history: allure-history # Specify the directory to store Allure history
# allure_report: allure-report allure_report: allure-report
# keep_reports: 20 # Specify the number of previous reports to keep keep_reports: 20 # Specify the number of previous reports to keep
#
# - name: Deploy Allure report to GitHub Pages # Step to deploy Allure report to GitHub Pages - name: Deploy Allure report to GitHub Pages # Step to deploy Allure report to GitHub Pages
# if: always() # Execute even if previous steps fail if: always() # Execute even if previous steps fail
# uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
# with: with:
# github_token: ${{ secrets.GITHUB_TOKEN }} # Provide the GitHub token for authentication github_token: ${{ secrets.GITHUB_TOKEN }} # Provide the GitHub token for authentication
# publish_branch: gh-pages # Specify the branch to publish the report to publish_branch: gh-pages # Specify the branch to publish the report to
# publish_dir: allure-history # Specify the directory containing the report publish_dir: allure-history # Specify the directory containing the report