forked from foolip/mdn-bcd-collector
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (52 loc) · 1.32 KB
/
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
name: Test
on:
push:
pull_request:
permissions:
contents: read
pull-requests: read
env:
FORCE_COLOR: 3
BCD_DIR: ./browser-compat-data
jobs:
test:
strategy:
matrix:
include:
- name: Linux
runs-on: ubuntu-latest
# - name: macOS
# runs-on: macos-latest
name: Test (${{ matrix.name }})
runs-on: ${{ matrix.runs-on }}
steps:
- name: Clone collector
uses: actions/checkout@v4
with:
submodules: true
- name: Clone browser-compat-data
uses: actions/checkout@v4
with:
repository: mdn/browser-compat-data
path: browser-compat-data
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 18
- name: Prepare browser-compat-data
run: npm ci
working-directory: browser-compat-data
- run: npm ci
- run: npm run format
- run: npm run build
- run: npm run unittest
# ensure we can start the server without dev dependencies
- name: Production smoke test
run: |
npm ci --production
npm start &
npx wait-on -t 10000 -v http://localhost:8080
env:
NODE_ENV: production
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3