7 types: [opened, synchronize, reopened]
13 description: 'With Benchmark?'
18 runs-on: ${{ matrix.os }}
22 os: [windows-latest, macos-latest, ubuntu-latest]
23 node: ['16.x', '18.x', '19.x']
27 uses: actions/checkout@v3
29 fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis. This is needed for better sonar
31 - name: Setup node ${{ matrix.node }}
32 uses: actions/setup-node@v3
34 node-version: ${{ matrix.node }}
39 corepack prepare pnpm@latest --activate
51 - name: Coverage Report
52 if: "github.repository == 'poolifier/poolifier' && matrix.os == 'ubuntu-latest' && matrix.node == '18.x'"
53 run: pnpm run coverage
55 - name: Sonar Code Analysis
56 if: "github.repository == 'poolifier/poolifier' && matrix.os == 'ubuntu-latest' && matrix.node == '18.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: pnpm run benchmark