Skip to content

Merge pull request #1139 from SimonGeb/master #1867

Merge pull request #1139 from SimonGeb/master

Merge pull request #1139 from SimonGeb/master #1867

Workflow file for this run

on:
# Trigger analysis when pushing in master or pull requests, and when creating
# a pull request.
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
name: Sonarcloud analyse
jobs:
sonarcloud:
runs-on: ubuntu-latest
# Deze workflow gebruikt een geheime key: SONAR_TOKEN en kan niet van een fork gerund worden
# Zie https://jira.sonarsource.com/browse/MMF-1371
if: github.repository == 'csrdelft/csrdelft.nl'
steps:
- uses: actions/checkout@v3
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Cache Yarn packages
id: yarn-cache
uses: actions/cache@v3
with:
path: |
.yarn
.pnp.cjs
.pnp.loader.mjs
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install yarn dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
- name: ESLint report
run: yarn run lint -f json-relative -o eslint-result.json
continue-on-error: true
- name: SonarCloud Scan
if: env.SONAR_TOKEN != ''
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}