Add CI workflows for Java and Express #9
Workflow file for this run
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 Express Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - development | |
| push: | |
| branches: | |
| - development | |
| jobs: | |
| test: | |
| name: Run Express Tests | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: server/express | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Run tests | |
| run: npm test -- --json --outputFile=test-results.json || true | |
| env: | |
| MONGODB_URI: ${{ secrets.MFLIX_URI }} | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results | |
| path: | | |
| server/express/coverage/ | |
| server/express/test-results.json | |
| retention-days: 30 | |
| - name: Generate Test Summary | |
| if: always() | |
| working-directory: . | |
| run: | | |
| chmod +x .github/scripts/generate-test-summary-jest.sh | |
| .github/scripts/generate-test-summary-jest.sh server/express/test-results.json |