Skip to content

Commit 3bf35cf

Browse files
committed
Add build & test workflow
1 parent 2b255b2 commit 3bf35cf

File tree

10 files changed

+2102
-22
lines changed

10 files changed

+2102
-22
lines changed

.github/workflows/build_test.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build & Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
types: [opened, synchronize]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: '16'
17+
- run: npm install
18+
- run: npm run build
19+
20+
test:
21+
runs-on: ubuntu-latest
22+
needs: build
23+
env:
24+
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
25+
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
26+
steps:
27+
- uses: actions/checkout@v3
28+
- uses: actions/setup-node@v3
29+
with:
30+
node-version: '16'
31+
32+
- uses: actions/setup-python@v3
33+
with:
34+
python-version: '3.x'
35+
36+
- uses: actions/checkout@v3
37+
with:
38+
repository: flackr/wpt
39+
path: wpt
40+
ref: inject-polyfill
41+
42+
- name: Setup WPT
43+
run: |
44+
cd wpt
45+
pip install virtualenv
46+
./wpt make-hosts-file | sudo tee -a /etc/hosts
47+
48+
- name: Run Tests
49+
run: |
50+
npm install
51+
npm run serve &
52+
./wpt/wpt manifest
53+
./wpt/wpt serve &
54+
npm test

0 commit comments

Comments
 (0)