Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,20 @@ jobs:
CHROMATIC_SLUG: ${{ github.repository }}
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 0

- name: Enable corepack
run: corepack enable

- name: Set up Node.js
uses: actions/setup-node@v6.4.0
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
cache: yarn
node-version-file: .nvmrc
Expand All @@ -41,6 +43,10 @@ jobs:
- name: Jest Tests
run: yarn test --coverage

- name: Sonar analysis
if: ${{ env.SONAR_TOKEN }}
uses: SonarSource/sonarqube-scan-action@7006c4492b2e0ee0f816d36501671557c97f5995

- name: Package build
run: yarn build
env:
Expand All @@ -53,15 +59,15 @@ jobs:

- name: Switch to PR branch
if: ${{ github.event_name == 'pull_request' && env.CHROMATIC_PROJECT_TOKEN }}
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
clean: false
fetch-depth: 0
ref: ${{ env.CHROMATIC_BRANCH }}

- name: Storybook deploy
if: ${{ env.CHROMATIC_PROJECT_TOKEN }}
uses: chromaui/action@v16.9.1
uses: chromaui/action@8d925269a481085d451544f6bd9aa2ab3af55b5d
with:
autoAcceptChanges: main
branchName: ${{ env.CHROMATIC_BRANCH}}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 0

- name: Enable corepack
run: corepack enable

- name: Set up Node.js
uses: actions/setup-node@v6.4.0
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
cache: yarn
node-version-file: .nvmrc
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { join } from 'node:path';

import { includeIgnoreFile } from '@eslint/compat';
import { includeIgnoreFile } from '@eslint/config-helpers';
import eslint from '@eslint/js';
import configPrettier from 'eslint-config-prettier/flat';
import pluginJsxA11y from 'eslint-plugin-jsx-a11y';
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"@babel/preset-env": "^7.29.5",
"@babel/preset-react": "^7.28.5",
"@babel/preset-typescript": "^7.28.5",
"@eslint/compat": "^2.0.5",
"@eslint/config-helpers": "^0.6.0",
"@eslint/js": "^9.39.4",
"@rollup/plugin-babel": "^7.0.0",
"@rollup/plugin-commonjs": "^29.0.2",
Expand All @@ -85,7 +85,7 @@
"@types/eslint-plugin-jsx-a11y": "^6.10.1",
"@types/jest": "^30.0.0",
"@types/jest-axe": "^3.5.9",
"@types/node": "^24.12.2",
"@types/node": "^24.12.4",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"babel-jest": "^30.3.0",
Expand All @@ -100,7 +100,7 @@
"eslint-plugin-node-import": "^1.2.0",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.1.0",
"globals": "^17.5.0",
"globals": "^17.6.0",
"jest": "^30.3.0",
"jest-axe": "^10.0.0",
"jest-environment-jsdom": "^30.3.0",
Expand All @@ -115,7 +115,7 @@
"storybook": "^10.2.14",
"tslib": "^2.8.1",
"typescript": "^6.0.3",
"typescript-eslint": "^8.58.2",
"typescript-eslint": "^8.59.4",
"vite": "^7.3.2",
"vite-tsconfig-paths": "^6.1.1"
},
Expand Down
12 changes: 12 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SonarQube properties
sonar.projectKey=NHSDigital_nhsuk-react-components
sonar.organization=nhsdigital

# Project language
sonar.language=js

# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8

sonar.sources=src
sonar.tests=src
Loading