diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fbcc1e46..3bc0edc7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,6 +55,8 @@ jobs: include: "${{ fromJson(needs.compute_tasks.outputs.ruby-33-matrix) }}" container: image: ghcr.io/datadog/images-rb/engines/ruby:3.3 + env: + BUNDLE_GEMFILE: "${{ matrix.gemfile }}" steps: - uses: actions/checkout@v4 - name: Configure Git @@ -62,11 +64,9 @@ jobs: - uses: actions/download-artifact@v4 with: name: bundled-dependencies-${{ github.run_id }}-ruby-33 - - run: bundle install --local + - run: bundle install && bundle exec rake compile_ext - name: Test ${{ matrix.task }} with ${{ matrix.gemfile }} - env: - BUNDLE_GEMFILE: "${{ matrix.gemfile }}" - run: bundle install && bundle exec rake spec:${{ matrix.task }} + run: bundle exec rake spec:${{ matrix.task }} test-ruby-32: name: 'ruby-3.2: ${{ matrix.task }} (${{ matrix.group }})' needs: @@ -78,6 +78,8 @@ jobs: include: "${{ fromJson(needs.compute_tasks.outputs.ruby-32-matrix) }}" container: image: ghcr.io/datadog/images-rb/engines/ruby:3.2 + env: + BUNDLE_GEMFILE: "${{ matrix.gemfile }}" steps: - uses: actions/checkout@v4 - name: Configure Git @@ -85,8 +87,6 @@ jobs: - uses: actions/download-artifact@v4 with: name: bundled-dependencies-${{ github.run_id }}-ruby-32 - - run: bundle install --local + - run: bundle install && bundle exec rake compile_ext - name: Test ${{ matrix.task }} with ${{ matrix.gemfile }} - env: - BUNDLE_GEMFILE: "${{ matrix.gemfile }}" - run: bundle install && bundle exec rake spec:${{ matrix.task }} + run: bundle exec rake spec:${{ matrix.task }} diff --git a/tasks/github.rake b/tasks/github.rake index e687c09a..30decf8b 100644 --- a/tasks/github.rake +++ b/tasks/github.rake @@ -41,7 +41,10 @@ namespace :github do } }, "container" => { - "image" => runtime.image + "image" => runtime.image, + "env" => { + "BUNDLE_GEMFILE" => "${{ matrix.gemfile }}" + } }, "steps" => [ { "uses" => "actions/checkout@v4" }, @@ -55,11 +58,10 @@ namespace :github do "name" => "bundled-dependencies-${{ github.run_id }}-#{runtime.alias}", } }, - { "run" => "bundle install --local" }, + { "run" => "bundle install && bundle exec rake compile_ext" }, { "name" => "Test ${{ matrix.task }} with ${{ matrix.gemfile }}", - "env" => { "BUNDLE_GEMFILE" => "${{ matrix.gemfile }}" }, - "run" => "bundle install && bundle exec rake spec:${{ matrix.task }}" + "run" => "bundle exec rake spec:${{ matrix.task }}" } ] }