|
| 1 | +name: System Tests - Official |
| 2 | +on: # yamllint disable-line rule:truthy |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - master |
| 6 | + # A workaround to trigger the workflow for pull requests from forked repository, |
| 7 | + # which does not have access to secrets. |
| 8 | + # |
| 9 | + # This is also useful for testing the workflow without opening a pull request. |
| 10 | + - tmp/* |
| 11 | + pull_request: |
| 12 | + branches: |
| 13 | + - master |
| 14 | + workflow_dispatch: {} |
| 15 | + schedule: |
| 16 | + - cron: "00 04 * * 2-6" |
| 17 | + |
| 18 | +# Default permissions for all jobs |
| 19 | +permissions: {} |
| 20 | + |
| 21 | +jobs: |
| 22 | + changes: |
| 23 | + name: Changes |
| 24 | + # temporary condition to test official workflow |
| 25 | + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.head_ref == 'cbeauchesne/system-tests-official') |
| 26 | + runs-on: ubuntu-24.04 |
| 27 | + outputs: |
| 28 | + changes: ${{ steps.changes.outputs.src }} |
| 29 | + steps: |
| 30 | + - name: Checkout |
| 31 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 32 | + with: |
| 33 | + persist-credentials: false |
| 34 | + - name: Changes |
| 35 | + uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 |
| 36 | + id: changes |
| 37 | + with: |
| 38 | + filters: | |
| 39 | + src: |
| 40 | + - '.github/forced-tests-list.json' |
| 41 | + - '.github/workflows/**' |
| 42 | + - 'lib/**' |
| 43 | + - 'ext/**' |
| 44 | + - '*.gemspec' |
| 45 | + - 'Gemfile' |
| 46 | + - '*.gemfile' |
| 47 | + - 'lib-injection/**' |
| 48 | + - 'tasks/**' |
| 49 | +
|
| 50 | + build: |
| 51 | + needs: |
| 52 | + - changes |
| 53 | + if: ${{ needs.changes.outputs.changes == 'true' }} |
| 54 | + runs-on: ubuntu-22.04 |
| 55 | + name: Build artifact |
| 56 | + permissions: |
| 57 | + packages: write |
| 58 | + steps: |
| 59 | + - name: Checkout DataDog/dd-trace-rb |
| 60 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 61 | + with: |
| 62 | + repository: DataDog/dd-trace-rb |
| 63 | + fetch-depth: 2 |
| 64 | + persist-credentials: false |
| 65 | + path: packaged/dd-trace-rb |
| 66 | + - name: Upload artifact |
| 67 | + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 |
| 68 | + with: |
| 69 | + name: dd-trace-rb # The name must match the folder name so it extracts to binaries/dd-trace-rb on download |
| 70 | + path: packaged |
| 71 | + |
| 72 | + test: |
| 73 | + strategy: |
| 74 | + fail-fast: false |
| 75 | + matrix: |
| 76 | + include: |
| 77 | + - weblogs: "" # All of them |
| 78 | + scenarios: DEFAULT,EVERYTHING_DISABLED,APPSEC_BLOCKING_FULL_DENYLIST,APPSEC_REQUEST_BLOCKING,APPSEC_BLOCKING,GRAPHQL_APPSEC |
| 79 | + - weblogs: rack,rails70 |
| 80 | + scenarios: | |
| 81 | + APPSEC_API_SECURITY, |
| 82 | + APPSEC_AUTO_EVENTS_EXTENDED, |
| 83 | + APPSEC_CORRUPTED_RULES, |
| 84 | + APPSEC_CUSTOM_OBFUSCATION, |
| 85 | + APPSEC_CUSTOM_RULES, |
| 86 | + APPSEC_LOW_WAF_TIMEOUT, |
| 87 | + APPSEC_MISSING_RULES, |
| 88 | + APPSEC_RATE_LIMITER, |
| 89 | + APPSEC_RULES_MONITORING_WITH_ERRORS, |
| 90 | + APPSEC_STANDALONE, |
| 91 | + CROSSED_TRACING_LIBRARIES, |
| 92 | + DEBUGGER_PII_REDACTION, |
| 93 | + DEBUGGER_PROBES_SNAPSHOT, |
| 94 | + DEBUGGER_PROBES_STATUS, |
| 95 | + INTEGRATIONS, |
| 96 | + PROFILING, |
| 97 | + REMOTE_CONFIG_MOCKED_BACKEND_ASM_DD, |
| 98 | + REMOTE_CONFIG_MOCKED_BACKEND_ASM_DD_NOCACHE, |
| 99 | + REMOTE_CONFIG_MOCKED_BACKEND_ASM_FEATURES, |
| 100 | + REMOTE_CONFIG_MOCKED_BACKEND_ASM_FEATURES_NOCACHE, |
| 101 | + SAMPLING, |
| 102 | + SCA_STANDALONE, |
| 103 | + TELEMETRY_APP_STARTED_PRODUCTS_DISABLED, |
| 104 | + TELEMETRY_DEPENDENCY_LOADED_TEST_FOR_DEPENDENCY_COLLECTION_DISABLED, |
| 105 | + TELEMETRY_LOG_GENERATION_DISABLED, |
| 106 | + TELEMETRY_METRIC_GENERATION_DISABLED |
| 107 | + needs: |
| 108 | + - build |
| 109 | + uses: DataDog/system-tests/.github/workflows/system-tests.yml@main |
| 110 | + secrets: inherit # zizmor: ignore[secrets-inherit] |
| 111 | + permissions: |
| 112 | + contents: read |
| 113 | + packages: write |
| 114 | + with: |
| 115 | + library: ruby |
| 116 | + binaries_artifact: dd-trace-rb |
| 117 | + desired_execution_time: 300 # 5 minutes |
| 118 | + scenarios: ${{ matrix.scenarios }} |
| 119 | + weblogs: ${{ matrix.weblogs }} |
| 120 | + skip_empty_scenarios: true |
| 121 | + ref: main |
| 122 | + |
| 123 | + complete: |
| 124 | + name: System Tests (complete) |
| 125 | + runs-on: ubuntu-24.04 |
| 126 | + needs: |
| 127 | + - test |
| 128 | + steps: |
| 129 | + - run: echo "DONE!" |
0 commit comments