Skip to content

TEST@main

TEST@main #39

Workflow file for this run

name: Run Test
run-name: 'TEST@${{github.ref_name}}'
on:
workflow_call:
push:
branches:
- main
paths:
- '*'
- src/**
- '!**.md'
concurrency:
group: test-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test & build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [20.x]
steps:
- uses: mato533/cicd-actions/setup-pnpm@main
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Type check
run: pnpm run typecheck
- name: Run the test
run: pnpm run test
- name: Build
run: pnpm run build
coverage:
name: Upload coverage to code climate
runs-on: ubuntu-latest
needs:
- test
if: github.event_name == 'push'
steps:
- uses: mato533/cicd-actions/setup-pnpm@main
with:
cache: 'pnpm'
- uses: paambaati/codeclimate-action@v9
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE }}
with:
coverageCommand: pnpm run coverage