8 types: [opened, synchronize, reopened]
12 description: 'With Benchmark?'
17 runs-on: ubuntu-latest
21 node: ['14.x', '16.x', '18.x']
25 uses: actions/checkout@v3
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 }}
30 uses: actions/setup-node@v3
32 node-version: ${{ matrix.node }}
35 if: matrix.node == '18.x'
36 run: npm ci --legacy-peer-deps
38 if: matrix.node != '18.x'
42 run: npm run build --if-present
47 - name: Tests & Coverage
48 if: matrix.node-version == '16.x'
55 - name: Sonar Code Analysis
56 if: "github.repository == 'poolifier/poolifier' && matrix.node == '16.x'"
57 uses: sonarsource/sonarcloud-github-action@master
59 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
60 SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
63 if: github.event.inputs.withBenchmark
64 run: npm run benchmark