-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (61 loc) · 1.74 KB
/
test-polyfills.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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 }}