Playwright_Pytest_BDD_Demo/.github/workflows/python-playwright-pytest-bd...

54 lines
1.6 KiB
YAML

# This is a basic workflow to help you get started with Actions
name: playwright pytest bdd demo CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
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:
# 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"
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
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
- 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
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-traces_and_results
path: |
report/
*trace.zip