Skip to content

chore: add github workflow #1

chore: add github workflow

chore: add github workflow #1

Workflow file for this run

name: Test
on: [push, pull_request]
jobs:
test-node:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
node: [18, 20]
name: Node ${{ matrix.node }} Test
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Restore NPM cache
uses: actions/cache@v3
continue-on-error: true
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run lint
test-rs:
runs-on: ubuntu-latest
timeout-minutes: 15
name: Rust Test
steps:
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all --check