All checks were successful
Test / Test Javascript code (push) Successful in 2m24s
Test / build_addon (17.x) (push) Successful in 24m34s
Test / build_addon (18.x) (push) Successful in 25m51s
Test / build_addon (19.x) (push) Successful in 23m52s
Test / build_addon (20.x) (push) Successful in 12m49s
Test / build_addon (21.x) (push) Successful in 12m52s
Test / build_addon (16.x) (push) Successful in 6m30s
Signed-off-by: Matheus Sampaio Queiroga <srherobrine20@gmail.com>
82 lines
1.9 KiB
YAML
82 lines
1.9 KiB
YAML
name: Test
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
test_js:
|
|
name: Test Javascript code
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
name: Checkout
|
|
|
|
- name: "Setup zig"
|
|
uses: korandoru/setup-zig@v1
|
|
with:
|
|
zig-version: "0.11.0"
|
|
|
|
- uses: actions/setup-node@v4
|
|
name: Setup Node.js
|
|
with:
|
|
node-version: 20.x
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
sudo apt update && sudo apt install -y "build-essential"
|
|
npm install --no-save --ignore-scripts
|
|
|
|
- name: Build addon
|
|
run: npm run dev
|
|
|
|
- name: Run tests
|
|
env:
|
|
FORCE_COLOR: "true"
|
|
run: node --no-warnings --loader ts-node/esm src/index_test.ts
|
|
|
|
build_addon:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node_version: [ 16.x, 17.x, 18.x, 19.x, 20.x, 21.x ]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
name: Checkout
|
|
|
|
- name: "Setup zig"
|
|
uses: korandoru/setup-zig@v1
|
|
with:
|
|
zig-version: "0.11.0"
|
|
|
|
- uses: actions/setup-node@v4
|
|
name: Setup Node.js
|
|
with:
|
|
node-version: ${{ matrix.node_version }}
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
sudo apt update && sudo apt install -y "build-essential"
|
|
npm install --no-save --ignore-scripts
|
|
|
|
- name: Build addon linux
|
|
run: npm run dev -- --target x86_64-linux --target aarch64-linux
|
|
|
|
- name: Build addon macos
|
|
run: npm run dev -- --target x86_64-macos --target aarch64-macos
|
|
|
|
- name: Build addon windows
|
|
run: npm run dev -- --target x86_64-windows --target aarch64-windows
|
|
|
|
- name: Upload prebuilds interface
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
retention-days: 7
|
|
name: build-${{ matrix.node_version }}
|
|
path: "build/*"
|