fix(core): Conditionally add tracing headers #2070
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: Checks | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - release/** | |
| pull_request: | |
| jobs: | |
| build: | |
| name: Build packages | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version-file: "package.json" | |
| - name: Use dependency cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| id: dependency-cache | |
| with: | |
| path: "**/node_modules" | |
| key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/yarn.lock') }} | |
| - name: Use build cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: .nxcache | |
| key: build-cache-key-${{ runner.os }}-${{ github.run_id }} | |
| restore-keys: | | |
| build-cache-key-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: yarn --frozen-lockfile --ignore-engines | |
| if: steps.dependency-cache.outputs.cache-hit != 'true' | |
| - run: yarn build | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: dist-artifacts-${{ github.run_id }} | |
| path: | | |
| packages/*/dist | |
| packages/*/*.tgz | |
| retention-days: 1 | |
| type-check: | |
| needs: build | |
| name: Typing check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version-file: "package.json" | |
| - name: Use dependency cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| id: dependency-cache | |
| with: | |
| path: "**/node_modules" | |
| key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/yarn.lock') }} | |
| - name: Use build cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: .nxcache | |
| key: build-cache-key-${{ runner.os }}-${{ github.run_id }} | |
| restore-keys: | | |
| build-cache-key-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: yarn --frozen-lockfile --ignore-engines | |
| if: steps.dependency-cache.outputs.cache-hit != 'true' | |
| - run: yarn check:types | |
| formatting-check: | |
| name: Formatting check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version-file: "package.json" | |
| - name: Use dependency cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| id: dependency-cache | |
| with: | |
| path: "**/node_modules" | |
| key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/yarn.lock') }} | |
| - name: Use build cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: .nxcache | |
| key: build-cache-key-${{ runner.os }}-${{ github.run_id }} | |
| restore-keys: | | |
| build-cache-key-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: yarn --frozen-lockfile --ignore-engines | |
| if: steps.dependency-cache.outputs.cache-hit != 'true' | |
| - run: yarn check:formatting | |
| test-unit: | |
| needs: build | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version-file: "package.json" | |
| - name: Use dependency cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| id: dependency-cache | |
| with: | |
| path: "**/node_modules" | |
| key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/yarn.lock') }} | |
| - name: Use build cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: .nxcache | |
| key: build-cache-key-${{ runner.os }}-${{ github.run_id }} | |
| restore-keys: | | |
| build-cache-key-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: yarn --frozen-lockfile --ignore-engines | |
| if: steps.dependency-cache.outputs.cache-hit != 'true' | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| with: | |
| name: dist-artifacts-${{ github.run_id }} | |
| path: packages | |
| - run: yarn test:unit | |
| test-integration: | |
| needs: build | |
| name: "Integration Tests (Node ${{ matrix.node-version }}, OS ${{ matrix.os }})" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [18, 20, 22, 24] | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Use dependency cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| id: dependency-cache | |
| with: | |
| path: "**/node_modules" | |
| key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/yarn.lock') }} | |
| - name: Install dependencies | |
| run: yarn --frozen-lockfile --ignore-engines | |
| if: steps.dependency-cache.outputs.cache-hit != 'true' | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| with: | |
| name: dist-artifacts-${{ github.run_id }} | |
| path: packages | |
| - run: yarn test:integration | |
| test-integration-next: | |
| needs: build | |
| name: "Integration Tests Next (Node ${{ matrix.node-version }}, OS ${{ matrix.os }})" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [18, 20, 22, 24] | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 | |
| with: | |
| version: 10 | |
| - name: Use dependency cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| id: dependency-cache | |
| with: | |
| path: "**/node_modules" | |
| key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/yarn.lock') }} | |
| - name: Install dependencies | |
| run: yarn --frozen-lockfile --ignore-engines | |
| if: steps.dependency-cache.outputs.cache-hit != 'true' | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| with: | |
| name: dist-artifacts-${{ github.run_id }} | |
| path: packages | |
| - run: yarn test:integration-next | |
| test-e2e: | |
| # We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks | |
| # Dependabot PRs sadly also don't have access to secrets, so we skip them as well | |
| if: | |
| (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && | |
| github.actor != 'dependabot[bot]' && | |
| false # Debug ID backend changes broke the E2E tests, we need to revisit them | |
| needs: build | |
| name: E2E Tests | |
| runs-on: ubuntu-latest | |
| env: | |
| SENTRY_AUTH_TOKEN: ${{ secrets.E2E_TESTS_SENTRY_AUTH_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: volta-cli/action@007b1509d3ea9999dbba62ca34f4eb968363bb78 # v3 | |
| - name: Use dependency cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| id: dependency-cache | |
| with: | |
| path: "**/node_modules" | |
| key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/yarn.lock') }} | |
| - name: Use build cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: .nxcache | |
| key: build-cache-key-${{ runner.os }}-${{ matrix.target }}-${{ matrix.jobIndex }}-${{ github.run_id }} | |
| restore-keys: | | |
| build-cache-key-${{ runner.os }}-${{ matrix.target }}-${{ matrix.jobIndex }}- | |
| - name: Install dependencies | |
| run: yarn --frozen-lockfile --ignore-engines | |
| if: steps.dependency-cache.outputs.cache-hit != 'true' | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| with: | |
| name: dist-artifacts-${{ github.run_id }} | |
| path: packages | |
| - run: yarn test:e2e | |
| lint: | |
| needs: build | |
| name: Linter check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version-file: "package.json" | |
| - name: Use dependency cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| id: dependency-cache | |
| with: | |
| path: "**/node_modules" | |
| key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/yarn.lock') }} | |
| - name: Use build cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: .nxcache | |
| key: build-cache-key-${{ runner.os }}-${{ github.run_id }} | |
| restore-keys: | | |
| build-cache-key-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: yarn --frozen-lockfile --ignore-engines | |
| if: steps.dependency-cache.outputs.cache-hit != 'true' | |
| - run: yarn lint | |
| artifacts: | |
| needs: build | |
| name: Upload Artifacts | |
| runs-on: ubuntu-latest | |
| # Build artifacts are only needed for releasing workflow. | |
| if: startsWith(github.ref, 'refs/heads/release/') | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version-file: "package.json" | |
| - name: Install dependencies | |
| run: yarn --frozen-lockfile | |
| - name: pack | |
| run: yarn build:npm | |
| - name: archive artifacts | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: ${{ github.sha }} | |
| path: | | |
| ${{ github.workspace }}/packages/*/dist/** | |
| ${{ github.workspace }}/packages/**/*.tgz |