-
Notifications
You must be signed in to change notification settings - Fork 45
85 lines (82 loc) · 2.64 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: test
on:
push:
branches: [master]
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
node: [18, 20]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: yarn
node-version: ${{matrix.node}}
- name: Install watchman
if: ${{ matrix.os == 'macos-latest' }}
run: |
wget https://github.com/facebook/watchman/releases/download/v2023.05.01.00/watchman-v2023.05.01.00-macos.zip
unzip watchman-*-macos.zip
cd watchman-v2023.05.01.00-macos
sudo mkdir -p /usr/local/{bin,lib} /usr/local/var/run/watchman
sudo cp bin/* /usr/local/bin
sudo cp lib/* /usr/local/lib
sudo chmod 755 /usr/local/bin/watchman
sudo chmod 2777 /usr/local/var/run/watchman
watchman -v
- name: Install watchman
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
wget https://github.com/facebook/watchman/releases/download/v2023.06.19.00/watchman-v2023.06.19.00-linux.zip
unzip watchman-*-linux.zip
cd watchman-v2023.06.19.00-linux
sudo mkdir -p /usr/local/{bin,lib} /usr/local/var/run/watchman
sudo cp bin/* /usr/local/bin
sudo cp lib/* /usr/local/lib
sudo chmod 755 /usr/local/bin/watchman
sudo chmod 2777 /usr/local/var/run/watchman
- name: Copy watchman
if: ${{ matrix.os == 'windows-latest' }}
run: |
Copy-Item -Recurse -Path watchman -Destination $home
$env:PATH += ";$home\watchman\windows\bin"
Add-Content $env:GITHUB_PATH "$home\watchman\windows\bin"
watchman -v
- run: yarn --frozen-lockfile
- run: yarn test
test-freebsd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Test in FreeBSD
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
pkg install -y -f curl node libnghttp2 npm yarn
echo "~~~~ node -v ~~~~"
node -v
echo "~~~~ yarn --version ~~~~"
yarn --version
run: |
yarn --frozen-lockfile
yarn test
test-wasm:
runs-on: ubuntu-latest
container:
image: emscripten/emsdk
steps:
- uses: actions/checkout@v3
- run: corepack enable
- uses: actions/setup-node@v3
with:
cache: yarn
node-version: 18
- run: yarn --frozen-lockfile
- run: make wasm-debug
- run: TEST_WASM=1 yarn test