refactor(backend)!: Simplify contributors endpoint to return all unique names without ranking #167
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: CI Pipeline | |
| on: | |
| push: | |
| branches: [main, dev] | |
| pull_request: | |
| branches: [main, dev] | |
| jobs: | |
| setup: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| pnpm-store-path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Disabling shallow clone for better SonarCloud analysis | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.9.0' | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v2 | |
| id: pnpm-install | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v3 | |
| id: pnpm-store-cache | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Cache node_modules | |
| uses: actions/cache@v3 | |
| id: modules-cache | |
| with: | |
| path: | | |
| node_modules | |
| apps/*/node_modules | |
| packages/*/node_modules | |
| key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-modules- | |
| - name: Install dependencies | |
| if: steps.modules-cache.outputs.cache-hit != 'true' | |
| run: pnpm install --frozen-lockfile | |
| lint: | |
| needs: setup | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.9.0' | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Restore pnpm store cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ needs.setup.outputs.pnpm-store-path }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| - name: Restore node_modules cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| node_modules | |
| apps/*/node_modules | |
| packages/*/node_modules | |
| key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| - name: Lint Codebase | |
| run: pnpm lint | |
| build: | |
| needs: [lint, setup] # Added setup as dependency to fix cache path issue | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.9.0' | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Restore pnpm store cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ needs.setup.outputs.pnpm-store-path }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| - name: Restore node_modules cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| node_modules | |
| apps/*/node_modules | |
| packages/*/node_modules | |
| key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| - name: Build All Apps | |
| run: pnpm build | |
| - name: Cache build output | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| apps/*/dist | |
| packages/*/dist | |
| key: ${{ runner.os }}-build-${{ github.sha }} | |
| test: | |
| needs: [setup, build] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.9.0' | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Restore pnpm store cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ needs.setup.outputs.pnpm-store-path }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| - name: Restore node_modules cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| node_modules | |
| apps/*/node_modules | |
| packages/*/node_modules | |
| key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| - name: Restore build output | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| apps/*/dist | |
| packages/*/dist | |
| key: ${{ runner.os }}-build-${{ github.sha }} | |
| - name: Run Tests with Coverage | |
| run: pnpm test:coverage | |
| - name: Upload Coverage Reports | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-reports | |
| path: '**/coverage' # Using glob pattern to find all coverage directories | |
| if-no-files-found: warn # Add warning if no files found | |
| retention-days: 1 | |
| sonarcloud: | |
| needs: [setup, test] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Disabling shallow clone for better SonarCloud analysis | |
| - name: Setup Node.js 20 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.9.0' | |
| - name: Download Coverage Reports | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: coverage-reports | |
| path: . | |
| - name: SonarCloud Scan | |
| uses: SonarSource/sonarcloud-github-action@v5.0.0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |