fix(ci): pin npm transitive deps via package-lock.json and npm ci #23544
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
| # Integration Test Suite | |
| # | |
| # This workflow runs the integration tests. If the workflow is triggered in the merge queue, all integration tests | |
| # are run. If the workflow is triggered in a PR commit, then the files changed in the PR are evaluated to determine | |
| # if any integration tests will run. | |
| name: Integration Test Suite | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| merge_group: | |
| types: [checks_requested] | |
| concurrency: | |
| # `github.event.number` exists for pull requests, otherwise fall back to SHA for merge queue | |
| group: ${{ github.workflow }}-${{ github.event.number || github.event.merge_group.head_sha }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| CONTAINER_TOOL: "docker" | |
| DD_ENV: "ci" | |
| DD_API_KEY: ${{ secrets.DD_API_KEY }} | |
| TEST_DATADOG_API_KEY: ${{ secrets.CI_TEST_DATADOG_API_KEY }} | |
| TEST_APPSIGNAL_PUSH_API_KEY: ${{ secrets.TEST_APPSIGNAL_PUSH_API_KEY }} | |
| AXIOM_TOKEN: ${{ secrets.AXIOM_TOKEN }} | |
| RUST_BACKTRACE: full | |
| VECTOR_LOG: vector=debug | |
| VERBOSE: true | |
| CI: true | |
| PROFILE: debug | |
| jobs: | |
| changes: | |
| if: github.event_name == 'merge_group' | |
| uses: ./.github/workflows/changes.yml | |
| with: | |
| source: true | |
| int_tests: true | |
| e2e_tests: true | |
| secrets: inherit | |
| build-test-runner: | |
| # Elevated permission required by build-test-runner.yml to push test runner image to GHCR | |
| permissions: | |
| contents: read | |
| packages: write | |
| needs: changes | |
| if: ${{ | |
| always() && | |
| (github.event_name == 'workflow_dispatch' || | |
| (github.event_name == 'merge_group' && | |
| needs.changes.result == 'success' && | |
| (needs.changes.outputs.dependencies == 'true' || | |
| needs.changes.outputs.integration-yml == 'true' || | |
| needs.changes.outputs.int-tests-any == 'true' || | |
| needs.changes.outputs.e2e-tests-any == 'true'))) | |
| }} | |
| uses: ./.github/workflows/build-test-runner.yml | |
| with: | |
| commit_sha: ${{ github.sha }} | |
| integration-tests: | |
| runs-on: ubuntu-24.04-8core | |
| needs: | |
| - changes | |
| - build-test-runner | |
| if: ${{ always() && !failure() && !cancelled() && needs.build-test-runner.result == 'success' && | |
| (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') }} | |
| strategy: | |
| matrix: | |
| # TODO: Add "splunk" back once https://github.com/vectordotdev/vector/issues/23474 is fixed. | |
| # If you modify this list, please also update the `int_tests` job in changes.yml. | |
| service: | |
| [ | |
| "amqp", | |
| "appsignal", | |
| "axiom", | |
| "aws", | |
| "azure", | |
| "clickhouse", | |
| "databend", | |
| "datadog-agent", | |
| "datadog-logs", | |
| "datadog-metrics", | |
| "datadog-traces", | |
| "dnstap", | |
| "docker-logs", | |
| "doris", | |
| "elasticsearch", | |
| "eventstoredb", | |
| "fluent", | |
| "gcp", | |
| "greptimedb", | |
| "http-client", | |
| "influxdb", | |
| "kafka", | |
| "logstash", | |
| "loki", | |
| "mqtt", | |
| "mongodb", | |
| "nats", | |
| "nginx", | |
| "opentelemetry", | |
| "postgres", | |
| "prometheus", | |
| "pulsar", | |
| "redis", | |
| "webhdfs" | |
| ] | |
| timeout-minutes: 90 | |
| steps: | |
| - name: Download JSON artifact from changes.yml | |
| uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 | |
| if: github.event_name == 'merge_group' | |
| with: | |
| name: int_tests_changes | |
| - name: Determine if test should run | |
| id: check | |
| run: | | |
| if [[ "${{ github.event_name }}" == "workflow_dispatch" || \ | |
| "${{ needs.changes.outputs.dependencies }}" == "true" || \ | |
| "${{ needs.changes.outputs.integration-yml }}" == "true" ]]; then | |
| echo "should_run=true" >> "$GITHUB_OUTPUT" | |
| elif [[ "${{ needs.changes.outputs.website_only }}" == "true" ]]; then | |
| echo "should_run=false" >> "$GITHUB_OUTPUT" | |
| elif [[ -f int_tests_changes.json ]]; then | |
| should_run=$(jq -r '."${{ matrix.service }}" // false' int_tests_changes.json) | |
| echo "should_run=${should_run}" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "should_run=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| if: steps.check.outputs.should_run == 'true' | |
| with: | |
| submodules: "recursive" | |
| - uses: ./.github/actions/setup | |
| if: steps.check.outputs.should_run == 'true' | |
| with: | |
| vdev: true | |
| mold: false | |
| cargo-cache: false | |
| datadog-ci: true | |
| - name: Pull test runner image | |
| if: steps.check.outputs.should_run == 'true' | |
| uses: ./.github/actions/pull-test-runner | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| commit_sha: ${{ github.sha }} | |
| - name: Run Integration Tests for ${{ matrix.service }} | |
| if: steps.check.outputs.should_run == 'true' | |
| uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 | |
| with: | |
| timeout_minutes: 30 | |
| max_attempts: 3 | |
| command: | | |
| bash scripts/run-integration-test.sh int ${{ matrix.service }} | |
| e2e-tests: | |
| runs-on: ubuntu-24.04-8core | |
| needs: | |
| - changes | |
| - build-test-runner | |
| if: ${{ always() && !failure() && !cancelled() && needs.build-test-runner.result == 'success' && | |
| (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') }} | |
| strategy: | |
| matrix: | |
| service: ["datadog-logs", "datadog-metrics", "opentelemetry-logs", "opentelemetry-metrics"] | |
| timeout-minutes: 90 | |
| steps: | |
| - name: Download JSON artifact from changes.yml | |
| uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 | |
| if: github.event_name == 'merge_group' | |
| with: | |
| name: e2e_tests_changes | |
| - name: Determine if test should run | |
| id: check | |
| run: | | |
| if [[ "${{ github.event_name }}" == "workflow_dispatch" || \ | |
| "${{ needs.changes.outputs.dependencies }}" == "true" || \ | |
| "${{ needs.changes.outputs.integration-yml }}" == "true" ]]; then | |
| echo "should_run=true" >> "$GITHUB_OUTPUT" | |
| elif [[ "${{ needs.changes.outputs.website_only }}" == "true" ]]; then | |
| echo "should_run=false" >> "$GITHUB_OUTPUT" | |
| elif [[ -f e2e_tests_changes.json ]]; then | |
| should_run=$(jq -r '."${{ matrix.service }}" // false' e2e_tests_changes.json) | |
| echo "should_run=${should_run}" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "should_run=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| if: steps.check.outputs.should_run == 'true' | |
| with: | |
| submodules: "recursive" | |
| - uses: ./.github/actions/setup | |
| if: steps.check.outputs.should_run == 'true' | |
| with: | |
| vdev: true | |
| mold: false | |
| cargo-cache: false | |
| datadog-ci: true | |
| - name: Pull test runner image | |
| if: steps.check.outputs.should_run == 'true' | |
| uses: ./.github/actions/pull-test-runner | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| commit_sha: ${{ github.sha }} | |
| - name: Run E2E Tests for ${{ matrix.service }} | |
| if: steps.check.outputs.should_run == 'true' | |
| uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 | |
| with: | |
| timeout_minutes: 30 | |
| max_attempts: 3 | |
| command: | | |
| bash scripts/run-integration-test.sh e2e ${{ matrix.service }} | |
| integration-test-suite: | |
| name: Integration Test Suite | |
| runs-on: ubuntu-24.04 | |
| if: always() | |
| needs: | |
| - changes | |
| - build-test-runner | |
| - integration-tests | |
| - e2e-tests | |
| steps: | |
| - run: | | |
| if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then | |
| echo "One or more jobs failed or were cancelled" | |
| exit 1 | |
| else | |
| echo "All jobs completed successfully" | |
| fi |