44 workflow_dispatch :
55 push :
66 branches : ["main"]
7+ paths :
8+ - " frontend/**"
79 pull_request :
810 branches : ["main"]
11+ paths :
12+ - " frontend/**"
913
1014concurrency :
11- group : ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
12- cancel-in-progress : true
15+ group : ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
16+ cancel-in-progress : true
17+
1318env :
14- FORCE_COLOR : " 1"
19+ FORCE_COLOR : " 1"
20+
1521jobs :
1622 frontend_tests :
17- if : ' ! github.event.pull_request.draft'
23+ if : " ! github.event.pull_request.draft"
1824 runs-on : ubuntu-latest
1925 name : Frontend Tests
2026 strategy :
@@ -23,34 +29,30 @@ jobs:
2329
2430 steps :
2531 - uses : actions/checkout@v4
32+
2633 - name : Use Node.js ${{ matrix.node-version }}
2734 uses : actions/setup-node@v4
2835 with :
2936 node-version : ${{ matrix.node-version }}
30- - name : Cache node modules
31- id : cache-npm
32- uses : actions/cache@v4
33- env :
34- cache-name : cache-node-modules
35- with :
36- path : ~/.npm
37- key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/frontend/package-lock.json') }}
38- restore-keys : |
39- ${{ runner.os }}-build-${{ env.cache-name }}-
40- ${{ runner.os }}-build-
41- ${{ runner.os }}-
37+ cache : " npm"
38+ cache-dependency-path : frontend/package-lock.json
39+
4240 - name : Install dependencies
4341 working-directory : ./frontend
44- run : npm ci
42+ run : npm install
43+
4544 - name : Run tests with coverage
4645 working-directory : ./frontend
4746 run : CI=true npm run test -- --coverage .
47+
4848 - name : Git fetch unshallow
49- run : |
50- git fetch --unshallow
49+ if : ${{ github.actor != 'dependabot[bot]' }}
50+ run : git fetch --unshallow
51+
5152 - name : UI SonarCloud Scan
52- uses : SonarSource/sonarcloud-github-action@master
53+ uses : SonarSource/sonarcloud-github-action@v3
5354 if : ${{ github.actor != 'dependabot[bot]' }}
55+ continue-on-error : true
5456 env :
5557 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5658 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
0 commit comments