Stamp version 1.2.14 #63
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
name: Node.js CI | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the main | |
# branch | |
push: | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in | |
# parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [10.x, 12.x, 14.x, 15.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
# Steps represent a sequence of tasks that will be executed as part of the | |
# job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can | |
# access it | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Get npm cache directory | |
id: npm-cache-dir | |
run: | | |
echo "::set-output name=dir::$(npm config get cache)" | |
- uses: actions/cache@v2 | |
# use this to check for `cache-hit` ==> if: | |
# steps.npm-cache.outputs.cache-hit != 'true' | |
id: npm-cache | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install | |
run: npm install | |
- name: Test | |
run: npm test |