Skip to content

Commit

Permalink
sonarcloud updates and low constrast for daqi.
Browse files Browse the repository at this point in the history
  • Loading branch information
ulysses-cognizant committed Nov 18, 2024
1 parent e9e1a31 commit a7ee3bc
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 19 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/check-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/publish-hotfix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

# - name: SonarCloud Scan
# uses: SonarSource/sonarcloud-github-action@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
font-weight: bold;
}

@media (prefers-contrast: less) {
@media (prefers-contrast: more) {
.daqi-selected {
background-color: #ffffff;
color: #ffffff;
Expand Down

0 comments on commit a7ee3bc

Please sign in to comment.