Skip to content

Merge pull request #98 from adrienverge/fix/webdav-put-progress-log-p… #391

Merge pull request #98 from adrienverge/fix/webdav-put-progress-log-p…

Merge pull request #98 from adrienverge/fix/webdav-put-progress-log-p… #391

Workflow file for this run

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)