-
-
Notifications
You must be signed in to change notification settings - Fork 139
62 lines (52 loc) · 1.85 KB
/
ciChecks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# 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: ['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
# Set up caching for quicker installs
- name: Get DENO_DIR store directory
shell: bash
# Expecting "DENO_DIR location: /Users/matt/Library/Caches/deno" somewhere in `deno info`
run: |
echo "DENO_DIR=$(deno info | grep "DENO_DIR" | awk '{print $3}')" >> $GITHUB_ENV
- name: Setup Deno cache
uses: actions/cache@v4
with:
path: ${{ env.DENO_DIR }}
key: ${{ runner.os }}-deno-dir-${{ hashFiles('**/deno.lock') }}
restore-keys: |
${{ runner.os }}-deno-dir-
# Install deps
- name: Install dependencies
run: deno install
# Build and test packages
- name: Test @simplewebauthn/server
run: cd packages/server && deno task test
- name: Test @simplewebauthn/browser
run: cd packages/browser && deno task test