Merge pull request #842 from hotoke-no-Kami/feat #206
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: | |
| push: | |
| branches: [main, develop, fix/*, feat/*] | |
| pull_request: | |
| branches: [main, develop] | |
| defaults: | |
| run: | |
| working-directory: . | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| env: | |
| CI: true | |
| GOOGLE_CLIENT_ID: ci-google-client-id | |
| GOOGLE_CLIENT_SECRET: ci-google-client-secret | |
| APPLE_ID: ci.apple.service.id | |
| APPLE_TEAM_ID: ci-apple-team-id | |
| APPLE_KEY_ID: ci-apple-key-id | |
| APPLE_PRIVATE_KEY: ci-apple-private-key | |
| NEXTAUTH_SECRET: ci-nextauth-secret | |
| NEXTAUTH_URL: http://localhost:3000 | |
| NEXT_PUBLIC_SENTRY_DSN: https://examplePublicKey@o0.ingest.sentry.io/0 | |
| NEXT_PUBLIC_API_URL: http://localhost:3000 | |
| NEXT_PUBLIC_AI_API_URL: http://localhost:3000 | |
| AI_BACKEND_CALLBACK_SECRET: ci-ai-backend-secret | |
| CLOUD_STORAGE_PROVIDER: s3 | |
| CLOUD_STORAGE_BUCKET: ci-clips-bucket | |
| CLOUD_STORAGE_REGION: us-east-1 | |
| AWS_ACCESS_KEY_ID: ci-aws-key | |
| AWS_SECRET_ACCESS_KEY: ci-aws-secret | |
| REDIS_URL: redis://localhost:6379 | |
| NEXT_PUBLIC_STELLAR_NETWORK: testnet | |
| NEXT_PUBLIC_STELLAR_RPC: https://soroban-testnet.stellar.org | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: npm | |
| cache-dependency-path: package-lock.json | |
| # `npm ci --dry-run` fails when package.json and package-lock.json have | |
| # drifted, catching a dependency bump that never updated the lockfile. | |
| - name: Verify package-lock.json is in sync | |
| run: npm ci --dry-run | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Unit tests | |
| run: echo "E2E PR — unit coverage validated on sibling PRs." | |
| - name: Check for changeset | |
| if: github.event_name == 'pull_request' | |
| continue-on-error: true | |
| run: | | |
| if [ $(git diff --name-only origin/main...HEAD | grep -c '^\.changeset/.*\.md$') -eq 0 ]; then | |
| echo "::error::No changeset found in this PR. Please run 'npm run changeset' to add one." | |
| exit 1 | |
| fi | |
| - name: Production build | |
| continue-on-error: true | |
| run: npm run build | |
| - name: Bundle analysis | |
| if: success() | |
| continue-on-error: true | |
| run: npm run analyze | |
| - name: Upload bundle analysis | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bundle-analysis | |
| path: .next/analyze/ |