chore: setup tests for node #3115
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
test: | |
name: ${{ matrix.runtime }} ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macOS-latest, windows-latest, ubuntu-latest] | |
runtime: [deno, node, bun] | |
env: | |
RUST_BACKTRACE: full | |
DENO_FUTURE: 1 | |
CLIFFY_SNAPSHOT_DELAY: 2000 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version-file: ".deno-version" | |
- name: Setup Node | |
if: ${{ matrix.runtime == 'node' }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".node-version" | |
- name: Setup Bun | |
if: ${{ matrix.runtime == 'bun' }} | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version-file: ".bun-version" | |
- name: Setup corepack | |
run: command -v corepack >/dev/null 2>&1 && corepack enable | |
- name: Install deps | |
run: deno task setup:${{ matrix.runtime }} | |
- name: Run tests | |
run: deno task test:${{ matrix.runtime }} | |
- name: Upload coverage | |
uses: codecov/codecov-action@v4 | |
with: | |
name: ${{ matrix.runtime }}-${{ matrix.os }} | |
files: dist/coverage/${{ matrix.module }}/cov.lcov | |
flags: ${{ matrix.runtime }} | |
token: ${{ secrets.CODECOV_TOKEN }} |