Skip to content

Running tests for refs/heads/main #119

Running tests for refs/heads/main

Running tests for refs/heads/main #119

Workflow file for this run

name: test
run-name: Running tests for ${{ github.ref }}
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_call:
secrets:
CC_TEST_REPORTER_ID:
description: "Code Climate Test Reporter ID to publish test results to Code Climate."
required: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: ./.nvmrc
cache: npm
- name: Install NPM Packages
run: npm ci
- name: Generate Test Data
run: npm run test:generate-data
- name: Run Tests & Publish Coverage to Code Climate
uses: paambaati/codeclimate-action@v5.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
if: ${{ env.CC_TEST_REPORTER_ID }}
with:
coverageCommand: npm run test:cov