-
-
Notifications
You must be signed in to change notification settings - Fork 37
64 lines (64 loc) · 1.67 KB
/
main.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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
detectonly:
name: Detect use of .only
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Detect use of .only
run: |
grep -rq --include '*.spec.js' \.only\( . && echo 'You have .only() in your tests!' && exit 1
exit 0
default:
name: "Default"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Default
run: |
npm install
sh setup.sh
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
cd ..
source ./emsdk/emsdk_env.sh
cd emscriptenbuild
./build.sh Release
cd ..
set -e
npm run test
npm run test-browser
./preparepublishnpm.sh
PACKAGEFILE=`npm pack | tail -n 1`
tar -xvzf $PACKAGEFILE
rm test-browser/lg2.*
echo "run browser tests with npm package"
cp package/lg2.* test-browser/
npm run test-browser
asyncify:
name: Asyncify
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Default
run: |
npm install
sh setup.sh
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
cd ..
source ./emsdk/emsdk_env.sh
cd emscriptenbuild
./build.sh Release-async
cd ..
set -e
npm run test-browser-async