-
-
Notifications
You must be signed in to change notification settings - Fork 38
60 lines (50 loc) · 1.53 KB
/
browser.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
# syntax: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
name: Browser
on:
push:
paths-ignore:
- '**.md'
- '.vscode/**'
- 'bundles/**'
- 'dev/**'
- 'readme/**'
pull_request:
paths-ignore:
- '**.md'
- '.vscode/**'
- 'bundles/**'
- 'dev/**'
- 'readme/**'
jobs:
build:
runs-on: ubuntu-latest
name: Browser
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: NodeJS
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install
run: |
rm -f package.json
rm -f package-lock.json
npm init -y
npm i -D rimraf typescript puppeteer
npm i -D webpack webpack-cli ts-loader nyc coverage-istanbul-loader
- name: Prepare
run: |
node_modules/.bin/rimraf .nyc_output coverage
node_modules/.bin/tsc -p tsconfig.json
node_modules/.bin/tsc -p scripts/browserTest/tsconfig.json
node_modules/.bin/webpack -c webpack/webpack.bundle.instrumented.js
- name: Test
run: |
node scripts/browserTest/index.mjs --coverage
- name: Coverage
run: |
node_modules/.bin/nyc report --exclude "src/{bundles,dev,htm,ui}/**" --exclude "src/mod.ts" --reporter=text --reporter=html --reporter=lcov
- name: Upload coverage to Codecov
if: ${{ github.ref == 'refs/heads/master' }}
uses: codecov/codecov-action@v2