Use github event in more github actions
[poolifier.git] / .github / workflows / ci.yml
index 4f9cba7534d78e132c2bb28633aec1ed9b3f1409..cdeb918394383e022e989c32f323468e00f6c6e0 100644 (file)
@@ -3,7 +3,7 @@ name: CI
 on:
   push:
     branches:
-      - master
+      - ${{ github.event.repository.default_branch }}
   pull_request:
     types: [opened, synchronize, reopened]
   workflow_dispatch:
@@ -42,14 +42,11 @@ jobs:
         run: npm run lint
 
       - name: Tests
-        if: "matrix.os != 'windows-latest' || matrix.node != '18.x' || matrix.node != '16.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'"