Skip to content

more cleanup

more cleanup #2

Workflow file for this run

name: Test Polyfills
on:
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, edge, firefox, ios, safari ]
steps:
- name: Branch based PR checkout
uses: actions/checkout@v2
with:
fetch-depth: 50
# Fetch master 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 master
# <insert integration tests needing secrets>
- uses: actions/setup-node@v2.2.0
with:
node-version: 16.x
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@v2.1.5
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 }}