-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (43 loc) · 1.46 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
name: Test
on:
push:
jobs:
test:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
- run: echo '${{ secrets.CONFIG_JSON }}' > ${{ github.workspace }}/src/config.json
- uses: ilammy/setup-nasm@v1
- name: windows-specific
shell: pwsh
if: runner.os == 'Windows'
run: choco install openssl.light --version=1.1.1 && choco install cmake --global && npm install --global cmake-js node-gyp && echo CMAKE_JS_LIB - $CMAKE_JS_LIB
- name: linux-specific
shell: bash
if: runner.os == 'Linux'
run: |
ldd --version
rm -rf /usr/local/bin/cmake
wget https://cmake.org/files/v3.27/cmake-3.27.9-linux-x86_64.tar.gz
tar xf cmake-3.27.9-linux-x86_64.tar.gz
WORKING_DIRECTORY=$(pwd)
echo "${WORKING_DIRECTORY}/cmake-3.27.9-linux-x86_64/bin" >> $GITHUB_PATH
echo "PATH=${WORKING_DIRECTORY}/cmake-3.27.9-linux-x86_64/bin:$PATH" >> $GITHUB_ENV
- name: Install Dependencies
run: npm install
- name: Run Rebuild
run: npm run rebuild
- name: Run Tests
if: runner.os == 'Linux'
run: xvfb-run -a npm test
- name: Run Tests
if: runner.os != 'Linux'
run: npm test