Skip to content

Read Node.js version from .nvmrc in GitHub Actions workflows #1

Read Node.js version from .nvmrc in GitHub Actions workflows

Read Node.js version from .nvmrc in GitHub Actions workflows #1

Workflow file for this run

name: Lint & Test
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Read .nvmrc
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
id: nvm
- name: Use Node.js ${{ steps.nvm.outputs.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
cache: npm
- name: Lint
run: |
npm install
npm run lint
- name: Test
run: npm run test:headless