diff --git a/.github/workflows/check-pull-request.yml b/.github/workflows/check-pull-request.yml index 5efff779..58414b4a 100644 --- a/.github/workflows/check-pull-request.yml +++ b/.github/workflows/check-pull-request.yml @@ -16,19 +16,26 @@ jobs: name: Run Pull Request Checks runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - name: Checkout code + uses: actions/checkout@v4 + + - name: Test code and Create Test Coverage Reports + uses: actions/setup-node@v4 with: node-version: 20 cache: npm - - run: npm install - - run: npm run format:check - - run: npm run lint - - run: npm test - # No longer needed with the latest version of the SonarCloud GitHub Action - # https://community.sonarsource.com/t/code-coverage-doesnt-work-with-github-action/16747/6 - # - name: make sonar aware of coverage tests path - # run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage/lcov.info + - run: | + npm ci + npm run build + npm run format:check + npm run lint + npm test + + - name: Test Docker Image Build + run: | + set +e + docker build --no-cache --tag cdp-node-frontend-template . + exit $? - name: SonarCloud Scan if: github.actor != 'dependabot[bot]' uses: SonarSource/sonarcloud-github-action@master diff --git a/.github/workflows/publish-hotfix.yml b/.github/workflows/publish-hotfix.yml index ff968e36..befed190 100644 --- a/.github/workflows/publish-hotfix.yml +++ b/.github/workflows/publish-hotfix.yml @@ -28,11 +28,19 @@ jobs: cache: npm # Ensure tests pass. Add more checks if required - - run: npm ci - - run: npm test + - run: | + npm ci + npm run build + npm run format:check + npm run lint + npm test - name: Publish Hot Fix uses: DEFRA/cdp-build-action/build-hotfix@main with: github-token: ${{ secrets.GITHUB_TOKEN }} - \ No newline at end of file +# - name: SonarCloud Scan +# uses: SonarSource/sonarcloud-github-action@master +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 564043b0..fc072f8a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -27,11 +27,11 @@ jobs: uses: DEFRA/cdp-build-action/build@main with: github-token: ${{ secrets.GITHUB_TOKEN }} - - run: npm install && npm test - # No longer needed with the latest version of the SonarCloud GitHub Action - # https://community.sonarsource.com/t/code-coverage-doesnt-work-with-github-action/16747/6 - # - name: make sonar aware of coverage tests path - # run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage/lcov.info + - name: Create Test Coverage Reports + run: | + npm ci + npm run build + npm test - name: SonarCloud Scan uses: SonarSource/sonarcloud-github-action@master env: diff --git a/sonar-project.properties b/sonar-project.properties index ef4b74f2..ed901942 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,3 +1,10 @@ +# To set up Sonar cloud follow https://github.com/DEFRA/cdp-documentation/blob/main/howto/sonarcloud.md +# Update properties in this file as per the howto instructions +# Uncomment properties in this .github/workflows/check-pull-request.yml +# Uncomment properties in this .github/workflows/publish.yml +# Uncomment properties in this .github/workflows/publish-hotfix.yml + + sonar.projectKey=DEFRA_aqie-front-end sonar.organization=defra diff --git a/src/client/assets/stylesheets/sass/components/_daqitable.scss b/src/client/assets/stylesheets/sass/components/_daqitable.scss index 505f192f..63aefc50 100644 --- a/src/client/assets/stylesheets/sass/components/_daqitable.scss +++ b/src/client/assets/stylesheets/sass/components/_daqitable.scss @@ -45,7 +45,7 @@ font-weight: bold; } -@media (prefers-contrast: less) { +@media (prefers-contrast: more) { .daqi-selected { background-color: #ffffff; color: #ffffff;