|
| 1 | +name: CI Instrumentation Full |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - main |
| 8 | + paths: &path_filters |
| 9 | + - 'helpers/**' |
| 10 | + - 'instrumentation/action_mailer/**' |
| 11 | + - 'instrumentation/action_pack/**' |
| 12 | + - 'instrumentation/action_view/**' |
| 13 | + - 'instrumentation/active_job/**' |
| 14 | + - 'instrumentation/active_model_serializers/**' |
| 15 | + - 'instrumentation/active_record/**' |
| 16 | + - 'instrumentation/active_storage/**' |
| 17 | + - 'instrumentation/active_support/**' |
| 18 | + - 'instrumentation/aws_sdk/**' |
| 19 | + - 'instrumentation/aws_lambda/**' |
| 20 | + - 'instrumentation/base/**' |
| 21 | + - 'instrumentation/concurrent_ruby/**' |
| 22 | + - 'instrumentation/delayed_job/**' |
| 23 | + - 'instrumentation/ethon/**' |
| 24 | + - 'instrumentation/excon/**' |
| 25 | + - 'instrumentation/faraday/**' |
| 26 | + - 'instrumentation/grape/**' |
| 27 | + - 'instrumentation/graphql/**' |
| 28 | + - 'instrumentation/grpc/**' |
| 29 | + - 'instrumentation/gruf/**' |
| 30 | + - 'instrumentation/http/**' |
| 31 | + - 'instrumentation/http_client/**' |
| 32 | + - 'instrumentation/httpx/**' |
| 33 | + - 'instrumentation/koala/**' |
| 34 | + - 'instrumentation/lmdb/**' |
| 35 | + - 'instrumentation/logger/**' |
| 36 | + - 'instrumentation/net_http/**' |
| 37 | + - 'instrumentation/rack/**' |
| 38 | + - 'instrumentation/rails/**' |
| 39 | + - 'instrumentation/restclient/**' |
| 40 | + - 'instrumentation/rspec/**' |
| 41 | + - 'instrumentation/sinatra/**' |
| 42 | + - '.github/workflows/ci-instrumentation-full.yml' |
| 43 | + - '.github/actions/**' |
| 44 | + - 'Gemfile' |
| 45 | + - 'Rakefile' |
| 46 | + - '.rubocop.yml' |
| 47 | + - 'gemspecs/**' |
| 48 | + pull_request: |
| 49 | + branches: |
| 50 | + - main |
| 51 | + paths: *path_filters |
| 52 | + schedule: |
| 53 | + - cron: "0 0 * * *" |
| 54 | + |
| 55 | +permissions: |
| 56 | + contents: read |
| 57 | + |
| 58 | +concurrency: |
| 59 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} # Ensure that only one instance of this workflow is running per Pull Request |
| 60 | + cancel-in-progress: true # Cancel any previous runs of this workflow |
| 61 | + |
| 62 | +jobs: |
| 63 | + instrumentation: |
| 64 | + strategy: |
| 65 | + fail-fast: false |
| 66 | + matrix: |
| 67 | + gem: |
| 68 | + - action_mailer |
| 69 | + - action_pack |
| 70 | + - action_view |
| 71 | + - active_job |
| 72 | + - active_model_serializers |
| 73 | + - active_record |
| 74 | + - active_storage |
| 75 | + - active_support |
| 76 | + - aws_sdk |
| 77 | + - aws_lambda |
| 78 | + - base |
| 79 | + - concurrent_ruby |
| 80 | + - delayed_job |
| 81 | + - ethon |
| 82 | + - excon |
| 83 | + - faraday |
| 84 | + - grape |
| 85 | + - graphql |
| 86 | + - grpc |
| 87 | + - gruf |
| 88 | + - http |
| 89 | + - http_client |
| 90 | + - httpx |
| 91 | + - koala |
| 92 | + - lmdb |
| 93 | + - logger |
| 94 | + - net_http |
| 95 | + - rack |
| 96 | + - rails |
| 97 | + - restclient |
| 98 | + - rspec |
| 99 | + - sinatra |
| 100 | + os: |
| 101 | + - ubuntu-latest |
| 102 | + |
| 103 | + name: ${{ matrix.gem }} / ${{ matrix.os }} |
| 104 | + runs-on: ${{ matrix.os }} |
| 105 | + steps: |
| 106 | + - uses: actions/checkout@v5 |
| 107 | + - name: "Test Ruby 3.4" |
| 108 | + uses: ./.github/actions/test_gem |
| 109 | + with: |
| 110 | + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" |
| 111 | + ruby: "3.4" |
| 112 | + - name: "Test Ruby 3.3" |
| 113 | + uses: ./.github/actions/test_gem |
| 114 | + with: |
| 115 | + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" |
| 116 | + ruby: "3.3" |
| 117 | + - name: "Test Ruby 3.2" |
| 118 | + uses: ./.github/actions/test_gem |
| 119 | + with: |
| 120 | + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" |
| 121 | + ruby: "3.2" |
| 122 | + yard: true |
| 123 | + rubocop: true |
| 124 | + coverage: true |
| 125 | + build: true |
| 126 | + - name: "JRuby Filter" |
| 127 | + id: jruby_skip |
| 128 | + shell: bash |
| 129 | + run: | |
| 130 | + echo "skip=false" >> $GITHUB_OUTPUT |
| 131 | + [[ "${{ matrix.gem }}" == "action_pack" ]] && echo "skip=true" >> $GITHUB_OUTPUT |
| 132 | + [[ "${{ matrix.gem }}" == "action_view" ]] && echo "skip=true" >> $GITHUB_OUTPUT |
| 133 | + [[ "${{ matrix.gem }}" == "active_model_serializers" ]] && echo "skip=true" >> $GITHUB_OUTPUT |
| 134 | + [[ "${{ matrix.gem }}" == "active_record" ]] && echo "skip=true" >> $GITHUB_OUTPUT |
| 135 | + [[ "${{ matrix.gem }}" == "active_storage" ]] && echo "skip=true" >> $GITHUB_OUTPUT |
| 136 | + [[ "${{ matrix.gem }}" == "active_support" ]] && echo "skip=true" >> $GITHUB_OUTPUT |
| 137 | + [[ "${{ matrix.gem }}" == "aws_sdk" ]] && echo "skip=true" >> $GITHUB_OUTPUT |
| 138 | + [[ "${{ matrix.gem }}" == "aws_lambda" ]] && echo "skip=true" >> $GITHUB_OUTPUT |
| 139 | + [[ "${{ matrix.gem }}" == "delayed_job" ]] && echo "skip=true" >> $GITHUB_OUTPUT |
| 140 | + [[ "${{ matrix.gem }}" == "graphql" ]] && echo "skip=true" >> $GITHUB_OUTPUT |
| 141 | + [[ "${{ matrix.gem }}" == "http" ]] && echo "skip=true" >> $GITHUB_OUTPUT |
| 142 | + [[ "${{ matrix.gem }}" == "http_client" ]] && echo "skip=true" >> $GITHUB_OUTPUT |
| 143 | + [[ "${{ matrix.gem }}" == "koala" ]] && echo "skip=true" >> $GITHUB_OUTPUT |
| 144 | + [[ "${{ matrix.gem }}" == "lmdb" ]] && echo "skip=true" >> $GITHUB_OUTPUT |
| 145 | + [[ "${{ matrix.gem }}" == "rack" ]] && echo "skip=true" >> $GITHUB_OUTPUT |
| 146 | + [[ "${{ matrix.gem }}" == "rails" ]] && echo "skip=true" >> $GITHUB_OUTPUT |
| 147 | + [[ "${{ matrix.gem }}" == "grpc" ]] && echo "skip=true" >> $GITHUB_OUTPUT |
| 148 | + [[ "${{ matrix.gem }}" == "gruf" ]] && echo "skip=true" >> $GITHUB_OUTPUT |
| 149 | + # This is essentially a bash script getting evaluated, so we need to return true or the whole job fails. |
| 150 | + true |
| 151 | + - name: "Test JRuby" |
| 152 | + if: "${{ matrix.os == 'ubuntu-latest' && steps.jruby_skip.outputs.skip == 'false' }}" |
| 153 | + uses: ./.github/actions/test_gem |
| 154 | + with: |
| 155 | + gem: "opentelemetry-instrumentation-${{ matrix.gem }}" |
| 156 | + ruby: "jruby-10.0.2.0" |
0 commit comments