Skip to content

Add initial draft of guidance for sortable table #693

Add initial draft of guidance for sortable table

Add initial draft of guidance for sortable table #693

Workflow file for this run

name: Pull request
on:
pull_request:
push:
branches:
- main
- 'feature/**'
- 'support/**'
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Cache dependencies
uses: actions/cache@v5
id: npm-install-cache
with:
key: npm-install-${{ hashFiles('package-lock.json') }}
path: node_modules
- name: Setup Node
if: steps.npm-install-cache.outputs.cache-hit != 'true'
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
- name: Install dependencies
if: steps.npm-install-cache.outputs.cache-hit != 'true'
run: npm install
- name: Build
run: npm run build
env:
NODE_ENV: production
linting:
name: Code style checks
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Restore dependencies (from cache)
uses: actions/cache/restore@v5
with:
fail-on-cache-miss: true
key: npm-install-${{ hashFiles('package-lock.json') }}
path: node_modules
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
package-manager-cache: false
- name: Run linting
run: npm run lint
tests:
name: Javascript unit tests
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Restore dependencies (from cache)
uses: actions/cache/restore@v5
with:
fail-on-cache-miss: true
key: npm-install-${{ hashFiles('package-lock.json') }}
path: node_modules
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
package-manager-cache: false
- name: Run tests
run: npm run test:js -- --coverage
- name: Save test coverage
uses: actions/upload-artifact@v7
with:
name: Javascript unit tests coverage
path: coverage
sonar:
name: Sonar analysis
runs-on: ubuntu-latest
needs: [build, tests]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
steps:
- name: Checkout
if: ${{ env.SONAR_TOKEN }}
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Restore test coverage
if: ${{ env.SONAR_TOKEN }}
uses: actions/download-artifact@v8
with:
name: Javascript unit tests coverage
path: coverage
- name: Sonar analysis
if: ${{ env.SONAR_TOKEN }}
uses: SonarSource/sonarqube-scan-action@v7