Signed-off-by: Matheus Sampaio Queiroga <srherobrine20@gmail.com>
57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
name: Test
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
test_host:
|
|
name: Test Host
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up latest Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "latest"
|
|
|
|
- name: Install build dependencies
|
|
run: sudo apt update && sudo apt install -y build-essential
|
|
|
|
- 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
|
|
|
|
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
|