-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.18 KB
/
node.js.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
# SPDX-License-Identifier: Apache-2.0
# 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: Node.js CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
name: install, build, test
permissions:
packages: write
contents: read
strategy:
matrix:
node-version: [16]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7
- name: Setup Node.js (.npmrc)
uses: actions/setup-node@v3
with:
node-version: 16.x
registry-url: https://npm.pkg.github.com/
# Defaults to the user or organization that owns the workflow file
scope: '@tazama-lf'
- name: Install dependencies
run: npm ci
env:
GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
- name: Run unit tests
run: npm run test
env:
NODE_ENV: 'test'