chore(dev-deps): bump @types/node from 22.10.7 to 22.13.1 #552
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SonarCloud analysis | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
pull-requests: read # allows SonarCloud to decorate PRs with analysis results | |
jobs: | |
Analysis: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.11.0 | |
cache: yarn | |
# Generate a .npmrc file with the NPM_TOKEN | |
- run: echo "registry=https://registry.yarnpkg.com/" > .npmrc | |
- run: echo "@internxt:registry=https://npm.pkg.github.com" >> .npmrc | |
- run: echo //npm.pkg.github.com/:_authToken=${{ secrets.NPM_TOKEN }} >> .npmrc | |
- run: echo "always-auth=true" >> .npmrc | |
# Create env file | |
- run: echo "${{ secrets.TEST_ENV}}" >> .env | |
# Install dependencies, build and run tests | |
- run: yarn install --network-timeout 600000 | |
- run: yarn build | |
- run: yarn test:unit | |
# Analyze with SonarCloud | |
- name: Analyze with SonarCloud | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret) |