Merge pull request #167 from hansikareddy29/feature/added-nav-links-l… #34
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: Canonforces CI Pipeline | |
| on: | |
| push: | |
| branches: [main, dev] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - run: npm install | |
| - run: npm run lint | |
| typecheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - run: npm install | |
| - run: npm run type-check | |
| tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18, 20] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Run tests with coverage | |
| run: npm run test:coverage | |
| - name: Upload coverage report | |
| if: matrix.node-version == 20 | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: coverage | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: tests | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - run: npm install | |
| - run: npm run build | |
| env: | |
| NEXT_PUBLIC_FIREBASE_API_KEY: test-key | |
| NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: test.firebaseapp.com | |
| NEXT_PUBLIC_FIREBASE_PROJECT_ID: test-project | |
| NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: test.appspot.com | |
| NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: "123456" | |
| NEXT_PUBLIC_FIREBASE_APP_ID: test-app | |
| NEXT_PUBLIC_GEMINI_API_KEY: test-key | |
| GEMINI_API_KEY: test-key |