Skip to content

chore(deps): bump actions/checkout from 3 to 4 #256

chore(deps): bump actions/checkout from 3 to 4

chore(deps): bump actions/checkout from 3 to 4 #256

Workflow file for this run

name: Unit testing
on:
pull_request:
branches:
- master
- 'releases/*'
jobs:
cancel-previous-runs:
name: Cancel previous runs
runs-on: ubuntu-latest
steps:
- name: ⏹ Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
unit-tests:
name: Run unit tests in the project
runs-on: ubuntu-latest
steps:
- name: 💻 Checkout
uses: actions/checkout@v4
- name: 🔨 Read .nvmrc
id: read_nvmrc
run: |
echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
- name: 🔨 Setup node
uses: actions/[email protected]
with:
node-version: ${{ steps.read_nvmrc.outputs.NODE_VERSION }}
- name: 🔨 Get npm cache directory
id: npm-cache
run: |
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
- name: 🔨 Cache dependencies
uses: actions/[email protected]
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: 🚧 Install dependencies
run: npm ci
- name: 🔄 Run tests
run: npm test