mirror of
https://github.com/kou029w/_.git
synced 2025-01-31 06:18:07 +00:00
34 lines
994 B
YAML
34 lines
994 B
YAML
name: playwright-example
|
|
on: workflow_dispatch
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
jobs:
|
|
main:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [windows-latest, macos-latest, ubuntu-latest]
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- id: yarn_cache
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
- uses: actions/cache@v1
|
|
with:
|
|
path: ${{ steps.yarn_cache.outputs.dir }}
|
|
key: ${{ matrix.os }}-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: yarn-
|
|
- run: yarn
|
|
working-directory: ./playwright
|
|
- if: matrix.os == 'ubuntu-latest'
|
|
run: sudo apt-get install gstreamer1.0-plugins-base
|
|
- run: node main
|
|
working-directory: ./playwright
|
|
env:
|
|
PLAYWRIGHT_RUNNER: ${{ matrix.os }}
|
|
- if: success() || failure()
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: screenshots
|
|
path: ./playwright/screenshots
|