Skip to content

Commit

Permalink
Experiment with getting Ruby versions from endoflife.date
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Dec 13, 2024
1 parent e54ca74 commit 0545443
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,25 @@ on:
branches: [main]
pull_request:
jobs:
versions:
name: Get latest versions
runs-on: ubuntu-latest
outputs:
ruby: ${{ fromJSON(steps.ruby.outputs.latest) }}
steps:
- id: ruby
run: |
DATA=$(curl https://endoflife.date/api/ruby.json)
SUPPORTED=$(echo $DATA | jq '[.[] | select(.eol > (now | strftime("%Y-%m-%d")))]')
echo "latest='$(echo $SUPPORTED | jq -c 'map(.latest)')'" >> $GITHUB_OUTPUT
test:
name: Test on Ruby ${{ matrix.ruby }} and Rails ${{ matrix.rails }}
needs: versions
runs-on: ubuntu-latest
name: Test on Ruby ${{ matrix.ruby }} and Rails ${{ matrix.rails }}
strategy:
fail-fast: false
matrix:
ruby: ["3.1", "3.2", "3.3", "3.4", head]
ruby: ${{needs.versions.outputs.ruby}}
rails: ["7.0.0", "7.1.0", "7.2.0", "8.0.0"]
env:
RAILS_VERSION: ${{ matrix.rails }}
Expand Down

0 comments on commit 0545443

Please sign in to comment.