Skip to content

Changed username error message (Feel free to reject and change the string on your side, it's just a more descriptive error message.) #576

Changed username error message (Feel free to reject and change the string on your side, it's just a more descriptive error message.)

Changed username error message (Feel free to reject and change the string on your side, it's just a more descriptive error message.) #576

Workflow file for this run

name: Test Codebase
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
permissions:
contents: write
jobs:
start:
name: Initial Setup
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Starting Job
run: |
echo "Beginning to test ${{ github.repository }}"
run_frontend_tests:
name: Test Frontend
needs: start
runs-on: ubuntu-latest
steps:
- name: Checkout "${{ github.repository }}"
uses: actions/checkout@v4
- name: Create frontend env file
run: |
touch frontend/.env
echo "${{ secrets.FRONTEND_ENV_FILE }}" > frontend/.env
shell: bash
- name: Set up Node (stable)
uses: actions/setup-node@v4
with:
node-version: 18.18
- name: Install dependencies
run: |
cd frontend && npm ci
- name: Delete old snapshots
run: |
rm -rf frontend/tests/__snapshots__/
shell: bash
- name: Test Codebase (with updated snapshots)
run: |
cd frontend && npm run test:cov -- --updateSnapshot
- name: Jest Coverage Comment
id: coverageComment
uses: MishaKav/jest-coverage-comment@main
with:
hide-comment: true
coverage-summary-path: ./frontend/coverage/coverage-summary.json
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Check the output coverage
run: |
echo "Coverage Percentage - ${{ steps.coverageComment.outputs.coverage }}"
echo "Coverage Color - ${{ steps.coverageComment.outputs.color }}"
echo "Summary HTML - ${{ steps.coverageComment.outputs.summaryHtml }}"
run_backend_tests:
name: Test Backend
needs: start
runs-on: ubuntu-latest
steps:
- name: Checkout "${{ github.repository }}"
uses: actions/checkout@v4
- name: Create backend env file
run: |
touch backend/.env
echo "${{ secrets.BACKEND_ENV_FILE }}" > backend/.env
shell: bash
- name: Set up Node (stable)
uses: actions/setup-node@v4
with:
node-version: 20.16
- name: Install dependencies
run: |
cd backend && npm ci
- name: Refresh Prisma Client
run: |
cd backend
npm run prisma-read > /dev/null
npm run prisma-gen
- name: Test Codebase
run: |
cd backend && npm run test:cov
- name: Jest Coverage Comment
id: coverageComment
uses: MishaKav/jest-coverage-comment@main
with:
hide-comment: true
coverage-summary-path: ./backend/coverage/coverage-summary.json
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Check the output coverage
run: |
echo "Coverage Percentage - ${{ steps.coverageComment.outputs.coverage }}"
echo "Coverage Color - ${{ steps.coverageComment.outputs.color }}"
echo "Summary HTML - ${{ steps.coverageComment.outputs.summaryHtml }}"
end:
name: The end
runs-on: ubuntu-latest
needs: [start, run_frontend_tests, run_backend_tests]
steps:
- name: Ending
id: init
run: |
echo "${{ github.repository }} has passed all tests"