playwright/.github/workflows/auto_roll.yml
Max Schmitt 8ea280090d
devops: first implementation of browser auto-roll bot (#3455)
Relates #3258

After a chat with @aslushnikov we add this in two iterations. The first one (this PR) is about scheduled runs for testing the latest tip-of-tree version of the browsers daily and the next PR is about opening an automated PRs once its passing (not sure if its worth to add for failing too) or sending Telegram/Slack notifications.

Current status is that Firefox (around 2 hours) and WebKit (around 3-4 hours) works.

Known issues which I fix before we merge:
- ~~Changes in `test/base.fixture.ts` will get extracted in #3453~~

Feel free to review, current blockers are before we can merge:
- ~~#3453~~
- potential git clone optimisation by aslushnikov
2020-08-17 11:23:46 -07:00

47 lines
1.6 KiB
YAML

name: Auto browser roll
on:
schedule:
- cron: '0 1 * * *'
jobs:
roll:
strategy:
fail-fast: false
matrix:
browser: [firefox, webkit]
runs-on: ubuntu-18.04
name: ${{ matrix.browser }}
steps:
- uses: microsoft/playwright-github-action@v1
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 10
- run: npm ci
- run: npm run build
- name: Build ${{ matrix.browser }}
id: build-browser
run: bash .github/workflows/auto_roll.sh ${{ matrix.browser }}
- run: mkdir -p coredumps
# Set core dump file name pattern
- run: sudo bash -c 'echo "$(pwd -P)/coredumps/core-pid_%p.dump" > /proc/sys/kernel/core_pattern'
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
# Wrap `npm run` in a subshell to redirect STDERR to file.
# Enable core dumps in the subshell.
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "ulimit -c unlimited && node test/runner test/ --jobs=1 --forbid-only --timeout=30000 && npm run coverage"
env:
BROWSER: ${{ matrix.browser }}
DEBUG: "pw:*,-pw:wrapped*,-pw:test*"
DEBUG_FILE: "testrun.log"
PWCHANNEL: none
FFPATH: ${{ steps.build-browser.outputs.FFPATH }}
WKPATH: ${{ steps.build-browser.outputs.WKPATH }}
- uses: actions/upload-artifact@v1
if: failure()
with:
name: ${{ matrix.browser }}-output
path: test/output-${{ matrix.browser }}
- uses: actions/upload-artifact@v1
if: ${{ always() }}
with:
name: ${{ matrix.browser }}-testrun.log
path: testrun.log