update github yaml

This commit is contained in:
shao.xiaoping 2024-01-23 11:29:00 +08:00
parent 119a45dddd
commit add0a80e9f
1 changed files with 18 additions and 6 deletions

View File

@ -9,6 +9,8 @@ on:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '0 0,4,12 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
@ -16,7 +18,7 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
@ -32,10 +34,20 @@ jobs:
cache: 'pipenv'
- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- run: pipenv install wheel
- run: pipenv install
- run: pipenv run python -m playwright install
- name: Run test cases and generate report
run: pipenv run python run.py
- 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: pytest -s --alluredir=temp -m smoke
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-traces_and_results
path: |
temp/
*trace.zip