Big code refactoring #10
53
.github/workflows/test.yaml
vendored
53
.github/workflows/test.yaml
vendored
@ -8,17 +8,36 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test_host:
|
test_linux:
|
||||||
name: Test Host
|
name: Test Linux
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [ 16.x, 18.x, 20.x, latest ]
|
||||||
steps:
|
steps:
|
||||||
|
- name: Disable sudo PATH replace
|
||||||
|
run: |
|
||||||
|
sudo cat /etc/sudoers | grep -v "secure_path=" > /tmp/.sudoers.tmp
|
||||||
|
cat /tmp/.sudoers.tmp | sudo tee /etc/sudoers
|
||||||
|
rm /tmp/.sudoers.tmp
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up latest Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "latest"
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
|
- uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version-file: addon/userspace/go/go.mod
|
||||||
|
go-version: ">=1.22.0"
|
||||||
|
|
||||||
|
- name: "Setup zig"
|
||||||
|
uses: korandoru/setup-zig@v1
|
||||||
|
with:
|
||||||
|
zig-version: "master"
|
||||||
|
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: sudo apt update && sudo apt install -y build-essential
|
run: sudo apt update && sudo apt install -y build-essential
|
||||||
@ -28,29 +47,3 @@ jobs:
|
|||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: ./node_modules/.bin/rebory build && sudo node --no-warnings --loader ts-node/esm src/index_test.js
|
run: ./node_modules/.bin/rebory build && sudo node --no-warnings --loader ts-node/esm src/index_test.js
|
||||||
|
|
||||||
test_matrix:
|
|
||||||
name: Test Matrix
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [ 16.x, 18.x, 20.x ]
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
|
|
||||||
- name: "Setup zig"
|
|
||||||
uses: korandoru/setup-zig@v1
|
|
||||||
with:
|
|
||||||
zig-version: "master"
|
|
||||||
|
|
||||||
- name: Install node dependencies
|
|
||||||
run: npm install --no-save --no-audit --no-fund --ignore-scripts
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: ./node_modules/.bin/rebory build && sudo node --no-warnings --loader ts-node/esm src/index_test.js
|
|
||||||
|
@ -46,6 +46,6 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"node-addon-api": "^8.0.0",
|
"node-addon-api": "^8.0.0",
|
||||||
"rebory": "^0.2.4"
|
"rebory": "^0.2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user