on:
push:
- branches:
- - master
+ branches: [master]
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis. This is needed for better sonar
- - name: Set node version to ${{ matrix.node }}
+ - name: Setup node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install
run: npm ci
- - name: Lint
- run: npm run lint
-
- name: Build
run: npm run build --if-present
+ - name: Lint
+ run: npm run lint
+
- name: Tests
- if: "matrix.os != 'windows-latest' || matrix.node != '18.x'"
run: npm run test
- - name: Coverage & Linter Reports
+ - name: Coverage Report
if: "github.repository == 'poolifier/poolifier' && matrix.os == 'ubuntu-latest' && matrix.node == '16.x'"
- run: |
- npm run coverage
- npm run lint:report
+ run: npm run coverage
- name: Sonar Code Analysis
if: "github.repository == 'poolifier/poolifier' && matrix.os == 'ubuntu-latest' && matrix.node == '16.x'"