Skip to content

[Backend] Revamp API logic and routes: API v2 #894

[Backend] Revamp API logic and routes: API v2

[Backend] Revamp API logic and routes: API v2 #894

Workflow file for this run

name: Node.js
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
name: Test
env:
node-version: "lts/*"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: |
- recursive: true
args: [--frozen-lockfile]
- name: Initialize project
run: pnpm common:build
- name: Run test and generate coverage report
run: |
echo "## Test coverage summary" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
pnpm jest --ci --coverage --coverageReporters=text --coverageReporters=text-summary --testLocationInResults >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
# - name: Run test and generate coverage report
# uses: ArtiomTr/jest-coverage-report-action@v2
# id: coverage
# with:
# package-manager: pnpm
# output: report-markdown
# - name: Write test coverage summary
# run: echo "${{ steps.coverage.outputs.report }}" >> $GITHUB_STEP_SUMMARY