8 types: [opened, synchronize, reopened]
14 description: 'With Benchmark?'
19 runs-on: ubuntu-latest
23 node-version: [12.x, 14.x, 16.x]
27 uses: actions/checkout@v2
29 fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis. This is needed for better sonar
31 - name: Set node version to ${{ matrix.node-version }}
32 uses: actions/setup-node@v2
34 node-version: ${{ matrix.node-version }}
40 run: npm run build --if-present
45 - name: Tests & Coverage
52 - name: Sonar Code Analysis
53 if: "github.repository == 'poolifier/poolifier' && matrix.node-version == '14.x'"
54 uses: SonarSource/sonarcloud-github-action@master
56 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
57 SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
60 if: github.event.inputs.withBenchmark
61 run: npm run benchmark