[Backend] Revamp API logic and routes: API v2 #894
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
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 |