(chore): nextjs bundle analysis #841
Workflow file for this run
This file contains 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: Diff FDR Dev | |
on: | |
pull_request: | |
branches: | |
- "*" | |
paths: | |
- "servers/fdr-deploy/scripts/**" | |
- ".github/workflows/diff-fdr-dev.yml" | |
- "pnpm-lock.yaml" | |
push: | |
branches: | |
- "*" | |
paths: | |
- "servers/fdr-deploy/scripts/**" | |
- ".github/workflows/diff-fdr-dev.yml" | |
- "pnpm-lock.yaml" | |
env: | |
PACKAGE_NAME: "@fern-platform/fdr" | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: "buildwithfern" | |
FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
FERNIE_SLACK_APP_TOKEN: ${{ secrets.FERNIE_SLACK_APP_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.FERN_GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.FERN_NPM_TOKEN }} | |
jobs: | |
diff_cdk: | |
runs-on: ubuntu-latest | |
environment: Fern Dev | |
strategy: | |
matrix: | |
concurrency: [1] | |
env: | |
DATABASE_URL: ${{ secrets.DATABASE_URL }}/fdr?schema=public | |
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} | |
ALGOLIA_ADMIN_API_KEY: ${{ secrets.ALGOLIA_ADMIN_API_KEY }} | |
ALGOLIA_SEARCH_INDEX: ${{ secrets.ALGOLIA_SEARCH_INDEX }} | |
ALGOLIA_SEARCH_API_KEY: ${{ secrets.ALGOLIA_SEARCH_API_KEY }} | |
APPLICATION_ENVIRONMENT: dev | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 📥 Install | |
uses: ./.github/actions/install | |
- name: 🔎 Has changed | |
id: has-changed | |
# if there are changes, npx turbo-ignore returns a failure exit code | |
# which makes steps.has-changed.outputs.RESULT = 'true' | |
run: npx turbo-ignore ${{ env.PACKAGE_NAME }} || echo "RESULT=true" >> $GITHUB_OUTPUT | |
- name: 🧪 Build and test | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
run: | | |
pnpm turbo codegen build test --filter=${{ env.PACKAGE_NAME }} | |
pnpm --filter "@fern-platform/fdr" sentry:sourcemaps | |
- name: 💻 Setup AWS CLI | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- name: 🚀 cdk diff | |
run: | | |
git_version="$(scripts/git-version.sh)" | |
pnpm --filter=@fern-platform/fdr run docker:dev "${git_version}" | |
npm install -g aws-cdk | |
cd servers/fdr-deploy | |
VERSION="${git_version}" pnpm --filter=@fern-platform/fdr-deploy cdk diff fdr-dev2 | |
env: | |
DATABASE_URL: ${{ secrets.DEV_POSTGRES_URL }}/fdr?schema=public |