8 types: [opened, synchronize, reopened]
12 description: 'With Benchmark?'
17 runs-on: ${{ matrix.os }}
21 os: [windows-latest, macos-latest, ubuntu-latest]
22 node: ['16.x', '18.x']
26 uses: actions/checkout@v3
28 fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis. This is needed for better sonar
30 - name: Set node version to ${{ matrix.node }}
31 uses: actions/setup-node@v3
33 node-version: ${{ matrix.node }}
39 run: npm run build --if-present
47 - name: Coverage Report
48 if: "github.repository == 'poolifier/poolifier' && matrix.os == 'ubuntu-latest' && matrix.node == '16.x'"
51 - name: Sonar Code Analysis
52 if: "github.repository == 'poolifier/poolifier' && matrix.os == 'ubuntu-latest' && matrix.node == '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