Skip to content

Commit

Permalink
fix: run CodeClimate on master only
Browse files Browse the repository at this point in the history
  • Loading branch information
mskec committed Feb 26, 2025
1 parent fb4213e commit c4678cc
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,18 @@ jobs:
sudo apt-get update
sudo apt-get install -y graphicsmagick ghostscript
- run: npm install
- uses: paambaati/codeclimate-action@v5

# Run tests only (for pull requests or non-master branches)
- name: Run tests only
if: github.ref != 'refs/heads/master'
run: npm test

# Run tests with CodeClimate reporting (only on master branch)
- name: Run tests with CodeClimate
if: github.ref == 'refs/heads/master'
uses: paambaati/codeclimate-action@v5
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: npm test

0 comments on commit c4678cc

Please sign in to comment.