|
1 | 1 | # Summary:
|
2 | 2 | # Run Unit and coverage tests, then upload it to Code Climate dashboard
|
3 | 3 | #
|
4 |
| -# See https://github.com/actions/checkout https://github.com/actions/checkout/releases/tag/v1 |
5 |
| -# See https://github.com/paambaati/codeclimate-action https://github.com/paambaati/codeclimate-action/tree/v2.7.5 |
| 4 | +# See https://github.com/actions/checkout https://github.com/actions/checkout/releases/tag/v3 |
| 5 | +# See https://github.com/paambaati/codeclimate-action https://github.com/paambaati/codeclimate-action/tree/v3.2.0 |
6 | 6 |
|
7 | 7 | name: Update Code Climate test coverage
|
8 | 8 |
|
9 | 9 | on:
|
10 | 10 | push:
|
11 | 11 | branches:
|
12 |
| - - 'main' # Change this branch name by your CodeClimate "main" branch use |
| 12 | + - main # Change this branch name by your CodeClimate "main" branch use |
13 | 13 |
|
14 | 14 | jobs:
|
15 | 15 | # Configures the deployment environment, install dependencies (like node, npm, etc.) that are requirements for the upcoming jobs
|
16 | 16 | # Ex: Necessary to run `yarn test:coverage`
|
17 | 17 | setup-environment:
|
18 |
| - name: Setup deployment environment (Ubuntu 18.04 - Node 12.x) |
19 |
| - runs-on: ubuntu-18.04 |
| 18 | + name: Setup deployment environment (Ubuntu 22.04 - Node 18.x) |
| 19 | + runs-on: ubuntu-22.04 |
20 | 20 | steps:
|
21 | 21 | - name: Installing node.js
|
22 |
| - uses: actions/setup-node@v1 # Used to install node environment - XXX https://github.com/actions/setup-node |
| 22 | + uses: actions/setup-node@v3 # Used to install node environment - XXX https://github.com/actions/setup-node |
23 | 23 | with:
|
24 |
| - node-version: '12.x' # Use the same node.js version as the one Vercel's uses (currently node12.x) |
| 24 | + node-version: 18 # Use the same node.js version as the one Vercel's uses (currently node18.x) |
25 | 25 | run-tests-coverage:
|
26 | 26 | name: Run tests coverage and send report to Code Climate
|
27 |
| - runs-on: ubuntu-18.04 |
| 27 | + runs-on: ubuntu-22.04 |
28 | 28 | steps:
|
29 |
| - - uses: actions/checkout@v1 |
| 29 | + - uses: actions/checkout@v3 |
30 | 30 | - name: Installing dependencies
|
31 | 31 | run: yarn install
|
32 |
| - - uses: paambaati/codeclimate-action@v2.7.5 |
| 32 | + - uses: paambaati/codeclimate-action@v3.2.0 |
33 | 33 | env:
|
34 |
| - # XXX Necessary for running tests properly (required). Do not generate the token from a Vercel account with actual production usage. (use a dummy account) |
35 |
| - VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} # XXX Define this secret in "Github repo > Settings > Secrets", you can get it from Vercel at https://vercel.com/account/tokens |
36 |
| - VERCEL_DOMAIN: ${{ secrets.VERCEL_DOMAIN }} # XXX Define this secret in "Github repo > Settings > Secrets", it should use a domain the VERCEL_TOKEN you provided has access to |
37 | 34 | 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".
|
38 | 35 | with:
|
39 | 36 | coverageCommand: yarn test:coverage
|
0 commit comments