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