Skip to content

STORY-19279: Automatically test supported ruby versions #17

STORY-19279: Automatically test supported ruby versions

STORY-19279: Automatically test supported ruby versions #17

Workflow file for this run

---
name: Pipeline
on:
- push:
- schedule:
- cron: '0 1 * * 1' # Every Monday at 1AM UTC
jobs:
ruby-versions:
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.versions.outputs.value }}
steps:
- id: versions
name: Fetch Ruby versions
run: |
versions="$(curl -s 'https://cache.ruby-lang.org/pub/misc/ci_versions/cruby.json' | jq -c '. - ["head"]')"
echo "Fetched Ruby versions: ${versions}"
echo "::set-output name=value::${versions}"
tests:
name: Unit Tests
runs-on: ubuntu-latest
needs: ruby-versions
strategy:
fail-fast: false
matrix:
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
gemfile:
- Gemfile
- gemfiles/unlocked.gemfile
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: 2.2.29
bundler-cache: true
- uses: nick-fields/retry@v3
with:
max_attempts: 2
timeout_minutes: 5
command: bundle exec rake test