Merge pull request #184 from vzhou-p/feature/pod-group #35
This file contains hidden or 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: Run Tests | |
| on: | |
| push: | |
| branches: ['*'] | |
| pull_request: | |
| branches: ['*'] | |
| jobs: | |
| frontend-tests: | |
| name: Frontend Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| - name: Install Dependencies | |
| working-directory: frontend | |
| run: npm ci | |
| - name: Lint Check | |
| working-directory: frontend | |
| run: npm run lint | |
| - name: ✅ Lint Check Passed | |
| if: success() | |
| run: echo "Frontend linting successful ✅" | |
| - name: Run Frontend Tests | |
| working-directory: frontend | |
| run: npm test | |
| - name: ✅ Frontend Tests Passed | |
| if: success() | |
| run: echo "Frontend tests passed ✅" | |
| backend-tests: | |
| name: Backend Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| - name: Install Dependencies | |
| working-directory: backend | |
| run: npm ci | |
| - name: ✅ Dependencies Installed | |
| if: success() | |
| run: echo "Backend dependencies installed successfully ✅" | |
| - name: Lint Check | |
| working-directory: backend | |
| run: | | |
| if npm run lint > /dev/null 2>&1; then | |
| npm run lint | |
| else | |
| echo "No lint script found, skipping lint check" | |
| fi | |
| - name: ✅ Lint Check Passed | |
| if: success() | |
| run: echo "Backend linting successful ✅" | |
| - name: Run Backend Tests | |
| working-directory: backend | |
| run: npm test | |
| - name: ✅ Backend Tests Passed | |
| if: success() | |
| run: echo "Backend tests passed ✅" |