WIP #49
This file contains 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
# Please do NOT manually edit this file. | |
# This file is generated by 'bundle exec rake github:actions:test_template' | |
--- | |
name: Test | |
'on': | |
- push | |
jobs: | |
compute_tasks: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
engine: | |
- name: ruby | |
version: '3.3' | |
alias: ruby-33 | |
- name: ruby | |
version: '3.2' | |
alias: ruby-32 | |
- name: ruby | |
version: '3.1' | |
alias: ruby-31 | |
- name: ruby | |
version: '3.0' | |
alias: ruby-30 | |
container: | |
image: ghcr.io/datadog/images-rb/engines/${{ matrix.engine.name }}:${{ matrix.engine.version }} | |
outputs: | |
ruby-33-matrix: "${{ steps.set-matrix.outputs.ruby-33 }}" | |
ruby-32-matrix: "${{ steps.set-matrix.outputs.ruby-32 }}" | |
ruby-31-matrix: "${{ steps.set-matrix.outputs.ruby-31 }}" | |
ruby-30-matrix: "${{ steps.set-matrix.outputs.ruby-30 }}" | |
steps: | |
- uses: actions/checkout@v4 | |
- run: apt update && apt install jq -y | |
- run: bundle install | |
- id: set-matrix | |
run: | | |
matrix_json=$(bundle exec rake github:generate_matrix) | |
# Debug output | |
echo "Generated JSON:" | |
echo "$matrix_json" | |
# Set the output | |
echo "${{ matrix.engine.alias }}=$(echo "$matrix_json" | jq -c .)" >> $GITHUB_OUTPUT | |
test-ruby-33: | |
name: Test on ruby 3.3 | |
needs: | |
- compute_tasks | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: "${{ fromJson(needs.compute_tasks.outputs.ruby-33-matrix) }}" | |
container: | |
image: ghcr.io/datadog/images-rb/engines/ruby:3.3 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: bundle install | |
- run: bundle exec rake test:${{ matrix.task }} | |
test-ruby-32: | |
name: Test on ruby 3.2 | |
needs: | |
- compute_tasks | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: "${{ fromJson(needs.compute_tasks.outputs.ruby-32-matrix) }}" | |
container: | |
image: ghcr.io/datadog/images-rb/engines/ruby:3.2 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: bundle install | |
- run: bundle exec rake test:${{ matrix.task }} | |
test-ruby-31: | |
name: Test on ruby 3.1 | |
needs: | |
- compute_tasks | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: "${{ fromJson(needs.compute_tasks.outputs.ruby-31-matrix) }}" | |
container: | |
image: ghcr.io/datadog/images-rb/engines/ruby:3.1 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: bundle install | |
- run: bundle exec rake test:${{ matrix.task }} | |
test-ruby-30: | |
name: Test on ruby 3.0 | |
needs: | |
- compute_tasks | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: "${{ fromJson(needs.compute_tasks.outputs.ruby-30-matrix) }}" | |
container: | |
image: ghcr.io/datadog/images-rb/engines/ruby:3.0 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: bundle install | |
- run: bundle exec rake test:${{ matrix.task }} |