Skip to content

53 virtual io for testing #156

53 virtual io for testing

53 virtual io for testing #156

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
VERSION: 0.3.2
jobs:
node:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 21.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: cargo install blockset
- run: npm run blockset-prepare
- run: npm test
node-os:
strategy:
matrix:
os: [windows-latest, macos-13]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- run: npm ci
- run: cargo install blockset
- run: npm run blockset-prepare-win
- run: npm test
deno:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- run: cargo install blockset
- run: npm run blockset-prepare
# - run: deno run --quiet --allow-read --allow-env --allow-net --allow-hrtime ./test.mjs
- run: deno run --quiet --allow-read --allow-write --allow-net --allow-hrtime ./test.mjs
bun:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: curl -fsSL https://bun.sh/install | bash
- run: cargo install blockset
- run: npm run blockset-prepare
- run: /home/runner/.bun/bin/bun ./test.mjs
pack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm pack
- uses: actions/upload-artifact@v3
with:
path: blockset-js-${{ env.VERSION }}.tgz
name: blockset-js.tgz
test-install-local:
needs: pack
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: blockset-js.tgz
- run: npm install -g blockset-js-${{ env.VERSION }}.tgz
- run: cargo install blockset
- run: echo "Hello World !" > _example.txt
- run: blockset add ./_example.txt
- run: npx blockset-js hsdfs1zs8fnf810v8f9k6pjdkz7b4y95sembmswac5sjt _out.txt
- run: blockset add ./_out.txt
test-install-net:
needs: pack
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: blockset-js.tgz
- run: npm install -g blockset-js-${{ env.VERSION }}.tgz
- run: npx blockset-js awt9x8564999k276wap2e5b7n10575ffy946kencva4ve _out.txt 410f5a49.blockset-js-test.pages.dev
- run: less ./_out.txt