Skip to content

Merge pull request #344 from citizensadvice/dependabot/npm_and_yarn/t… #710

Merge pull request #344 from citizensadvice/dependabot/npm_and_yarn/t…

Merge pull request #344 from citizensadvice/dependabot/npm_and_yarn/t… #710

Workflow file for this run

name: Test and lint
on:
push:
branches:
- main
- 1.x
pull_request:
branches:
- main
- 1.x
jobs:
test:
runs-on: ubuntu-slim
strategy:
matrix:
node-version: [22, 24, 26]
react-version: [18, 19]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Use Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Install react version
run: npm install react@^${{ matrix.react-version }} react-dom@^${{ matrix.react-version }}
- name: Run tests
run: npm test
lint:
runs-on: ubuntu-slim
needs: [test]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Use Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .nvmrc
- name: Install dependencies
run: npm ci
- name: Run lint checks
run: npm run lint