-
Notifications
You must be signed in to change notification settings - Fork 50
66 lines (62 loc) · 1.75 KB
/
build_test.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
name: Build & Test
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize]
jobs:
build:
runs-on: ubuntu-latest
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
WPT_MANIFEST: ${{ github.workspace }}/wpt/MANIFEST.json
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- uses: actions/setup-python@v3
with:
python-version: '3.x'
- uses: actions/checkout@v3
with:
repository: devknoll/wpt
path: wpt
ref: x-polyfill-all-tests
- name: Build
run: |
npm install
npm run build:wpt
- name: Setup WPT
run: |
cd wpt
pip install virtualenv
./wpt make-hosts-file | sudo tee -a /etc/hosts
- name: Run Tests
run: |
npm run serve &
./wpt/wpt manifest
./wpt/wpt serve --inject-script=${{ github.workspace }}/dist/container-query-polyfill.modern.js &
npm test
ret=$(node --loader ts-node/esm ./tests/diff.ts)
npm run prettier:fix
cat ./tests/pr.txt >> $GITHUB_STEP_SUMMARY
if [ $ret == "changed" ]; then
exit 1
fi
- uses: actions/upload-artifact@v3
with:
name: baseline.json
path: ./tests/baseline.json
if: failure()
- uses: actions/upload-artifact@v3
with:
name: results.json
path: ./tests/results.json
if: failure()
- uses: actions/upload-artifact@v3
with:
name: raw.json
path: ./tests/*.raw.json
if: failure()