7 types: [opened, synchronize, reopened]
11 description: 'With Benchmark?'
16 runs-on: ${{ matrix.os }}
20 os: [windows-latest, macos-latest, ubuntu-latest]
21 node: ['16.x', '18.x', '19.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: Setup node ${{ matrix.node }}
30 uses: actions/setup-node@v3
32 node-version: ${{ matrix.node }}
38 run: npm run build --if-present
46 - name: Coverage Report
47 if: "github.repository == 'poolifier/poolifier' && matrix.os == 'ubuntu-latest' && matrix.node == '18.x'"
50 - name: Sonar Code Analysis
51 if: "github.repository == 'poolifier/poolifier' && matrix.os == 'ubuntu-latest' && matrix.node == '18.x'"
52 uses: sonarsource/sonarcloud-github-action@master
54 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
55 SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
58 if: github.event.inputs.withBenchmark
59 run: npm run benchmark