Skip to content

Run compatibility tests once per day and on PR changes #26

Run compatibility tests once per day and on PR changes

Run compatibility tests once per day and on PR changes #26

name: Run Compatibility Tests
on:
schedule:
- cron: "0 0 * * *"
push:
branches:
- main
pull_request:
branches:
- main
jobs:
CompatibilityTest:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: "true"
with:
node-version: 18
args: install
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
# - name: Cache Puppeteer Chrome
# uses: actions/cache@v3
# env:
# cache-name: cache-puppeteer-chrome
# with:
# path: |
# ~/.cache/puppeteer
# key: ${{ runner.os }}-puppeteer-chrome-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-puppeteer-chrome-
- name: Install dependencies
run: npm install
# - name: Setup Chrome for Puppeteer
# run: npx puppeteer browsers install chrome
# - name: Run headless compatibility tests
# run: npm run test:compatibility:headless
# TODO: Find way to run headful tests in GitHub Actions
- name: Run compatibility tests
uses: nikkelm/puppeteer-headful@master
env:
CI: "true"
with:
args: npm run test:compatibility
# run: npm run test:compatibility:headful