Skip to content

Commit

Permalink
remove codacy, add codecov and deepsource
Browse files Browse the repository at this point in the history
  • Loading branch information
dangowans committed Mar 26, 2024
1 parent 7a2dbca commit dc1b545
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 13 deletions.
41 changes: 29 additions & 12 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ jobs:
fail-fast: false
matrix:
node: [18, 20, 21]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}

name: Node ${{ matrix.node }}
steps:
Expand All @@ -29,6 +34,13 @@ jobs:
- name: Copy Test Config
run: cp ./data/config.testing.js ./data/config.js

- name: Code Climate (Before)
if: ${{ github.event_name != 'pull_request' && env.CC_TEST_REPORTER_ID != '' && matrix.node == 20 }}
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./codeclimate-test-reporter
chmod +x codeclimate-test-reporter
./codeclimate-test-reporter before-build
- name: Verify Cypress
run: cypress verify
env:
Expand All @@ -39,18 +51,23 @@ jobs:
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}

- name: Code Climate
if: ${{ ! cancelled() && github.event_name != 'pull_request' && env.CC_TEST_REPORTER_ID != '' && matrix.node == 20 }}
- name: Code Climate (After)
if: ${{ github.event_name != 'pull_request' && env.CC_TEST_REPORTER_ID != '' && matrix.node == 20 }}
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./codeclimate-test-reporter
chmod +x codeclimate-test-reporter
./codeclimate-test-reporter before-build
./codeclimate-test-reporter after-build -t lcov --exit-code $?
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
- name: Codacy
if: ${{ ! cancelled() && github.event_name != 'pull_request' && env.CODACY_PROJECT_TOKEN != '' && matrix.node == 20 }}
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r ./coverage/lcov.info
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
- name: Codecov
if: ${{ github.event_name != 'pull_request' && env.CODECOV_TOKEN != '' && matrix.node == 20 }}
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN}
- name: DeepSource
if: ${{ github.event_name != 'pull_request' && env.DEEPSOURCE_DSN != '' && matrix.node == 20 }}
run: |
# Install deepsource CLI
curl https://deepsource.io/cli | sh
# From the root directory, run the report coverage command
./bin/deepsource report --analyzer test-coverage --key javascript --value-file ./coverage/lcov.info
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# General Licence Manager

[<img src="https://bulma.io/images/made-with-bulma.png" alt="Made with Bulma" width="128" height="24" />](https://bulma.io)
[![Codacy grade](https://img.shields.io/codacy/grade/97f530e50c2f416eb1eb5be9e4ef846f)](https://app.codacy.com/gh/cityssm/general-licence-manager/dashboard)
[![DeepSource](https://app.deepsource.com/gh/cityssm/general-licence-manager.svg/?label=active+issues&show_trend=true&token=ORSrQ921SKObd83e2GbLdPu4)](https://app.deepsource.com/gh/cityssm/general-licence-manager/)
[![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/cityssm/general-licence-manager)](https://codeclimate.com/github/cityssm/general-licence-manager)
[![Code Climate coverage](https://img.shields.io/codeclimate/coverage/cityssm/general-licence-manager)](https://codeclimate.com/github/cityssm/general-licence-manager)
[![Coverage Testing](https://github.com/cityssm/general-licence-manager/actions/workflows/coverage.yml/badge.svg)](https://github.com/cityssm/general-licence-manager/actions/workflows/coverage.yml)
Expand Down

0 comments on commit dc1b545

Please sign in to comment.