Skip to content

Adds build-types to watch script #189

Adds build-types to watch script

Adds build-types to watch script #189

Workflow file for this run

name: Test Polyfills
on:
merge_group:
pull_request:
workflow_dispatch:
concurrency:
group: browserstack
cancel-in-progress: false
jobs:
# Branch-based pull request
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
fail-fast: false
matrix:
browser:
- ie
- android
- chrome/1 - 50
- chrome/51 - 100
- chrome/>= 101
- edge
- firefox/1 - 50
- firefox/51 - 100
- firefox/>= 101
- ios
- safari
steps:
- name: Branch based PR checkout
uses: actions/checkout@v4
with:
fetch-depth: 50
# Fetch main branch to determine which polyfills have changed and need testing.
- name: Fetch upstream to determine diff
run: |
git remote add upstream https://github.com/mrhenry/polyfill-library.git
git fetch --depth=50 upstream main
# <insert integration tests needing secrets>
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: env
run: echo "commit-sha=$(echo ${GITHUB_SHA})" >> $GITHUB_ENV
- run: npm ci
- name: cache __dist
id: cache-dist
uses: actions/cache@v4
with:
path: polyfills/__dist
key: cache--dist--${{ env.commit-sha }}
- run: npm run build
if: steps.cache-dist.outputs.cache-hit != 'true'
- name: Test ${{ matrix.browser }}
run: node ./test/polyfills/server.js & node ./test/polyfills/remotetest.js
test-modified-only targeted director browser="${{ matrix.browser }}"
timeout-minutes: 30
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}