-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempted fix for the workflow build
- Loading branch information
1 parent
5c3fc34
commit 7bbf89b
Showing
1 changed file
with
30 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: Node.js CI | ||
|
||
on: | ||
|
@@ -16,25 +13,46 @@ jobs: | |
APP_ENV: test | ||
NODE_ENV: test | ||
CC_TEST_REPORTER_ID: d83276de03b0016003d9365783681c2c4398496b072fe2b1467d3a83d40aae05 | ||
|
||
services: | ||
redis: | ||
image: redis:latest | ||
ports: | ||
- 6379:6379 | ||
options: >- | ||
--health-cmd "redis-cli ping || exit 1" | ||
--health-interval 5s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
strategy: | ||
matrix: | ||
node-version: [20.x, 22.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
node-version: [22.x] | ||
|
||
steps: | ||
- name: Set up Redis | ||
uses: zhulik/[email protected] | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
|
||
- run: npm ci | ||
- run: npm run lint | ||
- 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 cover | ||
- run: ./cc-test-reporter after-build | ||
|
||
- name: Download Code Climate Test Reporter | ||
run: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | ||
|
||
- name: Make Test Reporter Executable | ||
run: chmod +x ./cc-test-reporter | ||
|
||
- name: Run Code Climate Test Reporter (Before Build) | ||
run: ./cc-test-reporter before-build | ||
|
||
- name: Run Tests with Coverage | ||
run: npm run cover | ||
|
||
- name: Run Code Climate Test Reporter (After Build) | ||
run: ./cc-test-reporter after-build | ||
if: github.event_name != 'pull_request' |