Skip to content

Commit

Permalink
Attempted fix for the workflow build
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbjensen committed Jan 13, 2025
1 parent 5c3fc34 commit 7bbf89b
Showing 1 changed file with 30 additions and 12 deletions.
42 changes: 30 additions & 12 deletions .github/workflows/node.js.yml
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:
Expand All @@ -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'

0 comments on commit 7bbf89b

Please sign in to comment.