Skip to content

Commit

Permalink
Merge pull request #64 from onebeyond/code-climate-test-coverage
Browse files Browse the repository at this point in the history
ci: add code climate test report gh action
  • Loading branch information
UlisesGascon authored Sep 8, 2023
2 parents ed738d1 + 67945bf commit f395ea4
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/code-climate-test-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Code Climate Test Reporter

on:
push:
branches: [master]
pull_request:
branches: [master]

permissions: # added using https://github.com/step-security/secure-workflows
contents: read

jobs:
code-climate:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: '18.x'
- run: npm ci
- run: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- run: chmod +x ./cc-test-reporter
- run: ./cc-test-reporter before-build
- run: npm run coverage
- run: ./cc-test-reporter format-coverage -t lcov coverage/lcov.info
- run: ./cc-test-reporter upload-coverage
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}

0 comments on commit f395ea4

Please sign in to comment.