Migrate to JSR.io #226
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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: CI Checks | |
on: | |
push: | |
branches: [ master, beta ] | |
pull_request: | |
branches: [ master, beta ] | |
jobs: | |
unit_tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ 20, 22 ] | |
deno-version: [ 'v1.46.x', 'v2.0.x' ] | |
steps: | |
- uses: actions/checkout@v4 | |
# Install Node | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Confirm installed Node version | |
run: node -v | |
# Install Deno | |
- name: Setup Deno ${{ matrix.deno-version }} | |
uses: denoland/setup-deno@v2 | |
with: | |
deno-version: ${{ matrix.deno-version }} | |
- name: Confirm installed Deno version | |
run: deno -V | |
# Install pnpm w/cache for quicker installs | |
# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time | |
- name: Setup pnpm 9.12.3 | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9.12.3 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: Setup pnpm cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
# Install deps | |
- name: Install dependencies | |
run: pnpm install | |
# Build and test packages | |
- name: Build & test @simplewebauthn/types | |
run: npm run build:types # browser tests will need this to be built | |
- name: Build & test @simplewebauthn/server | |
run: npm run build:server # dnt will test everything in Node too | |
- name: Test @simplewebauthn/browser | |
run: npm run test:browser |