- - name: npm install
- run: npm ci
- - name: npm run lint
- run: npm run lint
- - name: npm run build
- run: npm run build --if-present
- - name: npm test
- run: npm test
- # - name: npm run coverage
- # if: "github.repository == 'sap/e-mobility-charging-stations-simulator' && matrix.os == 'ubuntu-latest' && matrix.node == '16.x'"
- # run: npm run coverage
- # - name: SonarCloud Scan
- # if: "github.repository == 'sap/e-mobility-charging-stations-simulator' && matrix.os == 'ubuntu-latest' && matrix.node == '16.x'"
- # uses: sonarsource/sonarcloud-github-action@master
- # env:
- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
- # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- build-docker:
+ cache: 'pnpm'
+ - name: pnpm install
+ run: pnpm install --ignore-scripts --frozen-lockfile
+ - name: pnpm lint
+ if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '20.x' }}
+ run: pnpm lint
+ - name: pnpm build
+ run: pnpm build
+ - name: pnpm test
+ run: pnpm test
+ - name: pnpm coverage
+ if: ${{ github.repository == 'sap/e-mobility-charging-stations-simulator' && matrix.os == 'ubuntu-latest' && matrix.node == '20.x' }}
+ run: pnpm coverage
+ - name: SonarCloud Scan
+ if: ${{ needs.check-secrets.outputs.sonar-token-exists == 'true' && github.repository == 'sap/e-mobility-charging-stations-simulator' && matrix.os == 'ubuntu-latest' && matrix.node == '20.x' }}
+ uses: sonarsource/sonarcloud-github-action@v2.0.2
+ with:
+ projectBaseDir: ui/web
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
+ build-docker-image: