-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathupdate-codeclimate-coverage.yml
More file actions
36 lines (33 loc) · 1.44 KB
/
update-codeclimate-coverage.yml
File metadata and controls
36 lines (33 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Summary:
# Run Unit and coverage tests, then upload it to Code Climate dashboard
#
# See https://github.com/actions/checkout https://github.com/actions/checkout/releases/tag/v3
# See https://github.com/paambaati/codeclimate-action https://github.com/paambaati/codeclimate-action/tree/v3.2.0
name: Update Code Climate test coverage
on:
push:
branches:
- main # Change this branch name by your CodeClimate "main" branch use
jobs:
# Configures the deployment environment, install dependencies (like node, npm, etc.) that are requirements for the upcoming jobs
# Ex: Necessary to run `yarn test:coverage`
setup-environment:
name: Setup deployment environment (Ubuntu 22.04 - Node 18.x)
runs-on: ubuntu-22.04
steps:
- name: Installing node.js
uses: actions/setup-node@v3 # Used to install node environment - XXX https://github.com/actions/setup-node
with:
node-version: 18
run-tests-coverage:
name: Run tests coverage and send report to Code Climate
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Installing dependencies
run: yarn install
- uses: paambaati/codeclimate-action@v3.2.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} # XXX Define this secret in "Github repo > Settings > Secrets", you can get it from Code Climate in "Repo settings > Test coverage".
with:
coverageCommand: yarn test:coverage