Skip to content

Update tests to gitlab and github #29

Update tests to gitlab and github

Update tests to gitlab and github #29

Workflow file for this run

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: "master"
- 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 "binutils-multiarch" "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, 18.x, 19.x, 20.x, 21.x ]
target_arch: [ "x86_64", "aarch64" ]
target_os:
- "linux"
# - "macos"
steps:
- uses: actions/checkout@v4
name: Checkout
- name: "Setup zig"
uses: korandoru/setup-zig@v1
with:
zig-version: "master"
- 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 "binutils-multiarch" "build-essential"
npm install --no-save --ignore-scripts
- name: Build addon
run: npm run dev -- --target ${{ matrix.target_arch }}-${{ matrix.target_os }}
- name: Upload prebuilds interface
uses: actions/upload-artifact@v3
with:
retention-days: 7
name: prebuilds_${{ matrix.target_arch }}-${{ matrix.target_os }}_${{ matrix.node_version }}
path: "build/*"