feat(user): add follow/unfollow on profile pages #281
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 | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: pnpm | |
| - uses: actions/cache@v6 | |
| id: deps | |
| with: | |
| path: | | |
| node_modules | |
| lib/generated | |
| key: ${{ runner.os }}-deps-${{ hashFiles('pnpm-lock.yaml', 'prisma/schema.prisma') }} | |
| - run: pnpm install --frozen-lockfile | |
| if: steps.deps.outputs.cache-hit != 'true' | |
| env: | |
| DATABASE_URL: postgresql://user:pass@localhost:5432/db | |
| - run: pnpm db:generate | |
| if: steps.deps.outputs.cache-hit != 'true' | |
| env: | |
| DATABASE_URL: postgresql://user:pass@localhost:5432/db | |
| - run: pnpm lint | |
| typecheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: pnpm | |
| - uses: actions/cache@v6 | |
| id: deps | |
| with: | |
| path: | | |
| node_modules | |
| lib/generated | |
| key: ${{ runner.os }}-deps-${{ hashFiles('pnpm-lock.yaml', 'prisma/schema.prisma') }} | |
| - run: pnpm install --frozen-lockfile | |
| if: steps.deps.outputs.cache-hit != 'true' | |
| env: | |
| DATABASE_URL: postgresql://user:pass@localhost:5432/db | |
| - run: pnpm db:generate | |
| if: steps.deps.outputs.cache-hit != 'true' | |
| env: | |
| DATABASE_URL: postgresql://user:pass@localhost:5432/db | |
| - run: pnpm typecheck | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: pnpm | |
| - uses: actions/cache@v6 | |
| id: deps | |
| with: | |
| path: | | |
| node_modules | |
| lib/generated | |
| key: ${{ runner.os }}-deps-${{ hashFiles('pnpm-lock.yaml', 'prisma/schema.prisma') }} | |
| - run: pnpm install --frozen-lockfile | |
| if: steps.deps.outputs.cache-hit != 'true' | |
| env: | |
| DATABASE_URL: postgresql://user:pass@localhost:5432/db | |
| - run: pnpm db:generate | |
| if: steps.deps.outputs.cache-hit != 'true' | |
| env: | |
| DATABASE_URL: postgresql://user:pass@localhost:5432/db | |
| - run: pnpm test:coverage | |
| - uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: coverage | |
| path: coverage | |
| migrate: | |
| needs: [lint, typecheck, test] | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| environment: Production | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| env: | |
| DATABASE_URL: ${{ secrets.PROD_DATABASE_URL }} | |
| - run: pnpm db:migrate:deploy | |
| env: | |
| DATABASE_URL: ${{ secrets.PROD_DATABASE_URL }} |