Skip to content

Commit

Permalink
chore(ci): test nodejs compatibility across different versions
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-roslaniec committed Apr 29, 2024
1 parent 354381d commit a6fbf4f
Showing 1 changed file with 44 additions and 8 deletions.
52 changes: 44 additions & 8 deletions .github/workflows/nucypher-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,29 +66,65 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20, 22]
rust:
- stable
target:
- wasm32-unknown-unknown

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Yarn
run: npm install -g yarn
- run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- run: make
working-directory: nucypher-core-wasm
- uses: borales/[email protected]
- run: yarn install
working-directory: nucypher-core-wasm/examples/node
- run: yarn build
working-directory: nucypher-core-wasm/examples/node
- run: yarn test
working-directory: nucypher-core-wasm/examples/node

# Tests for compatibility across different versions of Node.js
yarn-test-node-22:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 18, 20, 22 ]
rust:
- stable
target:
- wasm32-unknown-unknown
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
cmd: --cwd nucypher-core-wasm/examples/node install
- uses: borales/[email protected]
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- uses: actions/setup-node@v4
with:
cmd: --cwd nucypher-core-wasm/examples/node build
- uses: borales/[email protected]
node-version: 22
- name: Install Yarn
run: npm install -g yarn
- run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- run: make
working-directory: nucypher-core-wasm
- run: yarn install
working-directory: nucypher-core-wasm/examples/node
- run: yarn build
working-directory: nucypher-core-wasm/examples/node
- uses: actions/setup-node@v4
with:
cmd: --cwd nucypher-core-wasm/examples/node test
node-version: ${{ matrix.node-version }}
- run: yarn test
working-directory: nucypher-core-wasm/examples/node

rebundle-wasm:
runs-on: ubuntu-latest
Expand Down

0 comments on commit a6fbf4f

Please sign in to comment.