Skip to content

WIP

WIP #46

Workflow file for this run

---
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
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 }}"
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-31:
name: Test on ruby 3.1
needs:
- compute_tasks
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include: "${{ 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-32:
name: Test on ruby 3.2
needs:
- compute_tasks
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include: "${{ 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-33:
name: Test on ruby 3.3
needs:
- compute_tasks
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include: "${{ 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 }}