Merge pull request #2 from Amarusinggithub/codex/add-tests-for-login-… #3
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: CLIENT CI/CD Pipeline | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| - prod | |
| - qa | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| - prod | |
| - qa | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: "client" | |
| strategy: | |
| matrix: | |
| node-version: [22.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "npm" | |
| cache-dependency-path: "**/package-lock.json" | |
| - name: Recreate .env from secret | |
| run: echo "${{ secrets.PROD_ENV_FILE }}" > .env | |
| - run: npm ci | |
| - name: Format Client | |
| run: npm run format | |
| - name: Lint Client | |
| run: npm run lint | |
| - name: Test Client | |
| run: npm run test | |
| - name: Test coverage Client | |
| run: npm run coverage | |
| - name: Build Client | |
| run: npm run build | |