Scheduled Playwright Tests #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Scheduled Playwright Tests | |
on: | |
schedule: | |
# Every Monday at 12:00 UTC | |
- cron: '0 12 * * 1' | |
jobs: | |
test: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: yarn | |
- name: Install Playwright Browsers | |
run: yarn playwright install --with-deps chromium | |
- name: Build Extension files | |
run: yarn build:chromium | |
- name: Run Playwright tests | |
run: yarn playwright test | |
- name: Notify Slack On Failure | |
if: failure() | |
uses: slackapi/slack-github-action@v1.24.0 | |
with: | |
payload: | | |
{ | |
"channel": "feed-packages", | |
"attachments": [ | |
{ | |
"color": "#ff0000", | |
"text": "gk-browser-extension scheduled Playwright tests failed" | |
} | |
] | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |