2020-07-27 19:34:50 +09:00
|
|
|
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]
|
2020-07-27 20:15:39 +09:00
|
|
|
fail-fast: false
|
2020-07-27 19:34:50 +09:00
|
|
|
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
|
2020-07-27 20:04:49 +09:00
|
|
|
- if: matrix.os == 'ubuntu-latest'
|
2020-07-27 20:20:08 +09:00
|
|
|
run: sudo apt-get install gstreamer1.0-plugins-base libwoff1
|
2020-07-27 19:34:50 +09:00
|
|
|
- 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
|