Skip to content
This repository was archived by the owner on Aug 24, 2026. It is now read-only.

Merge pull request #84 from microsoft/ci/dependabot-codeql-group #127

Merge pull request #84 from microsoft/ci/dependabot-codeql-group

Merge pull request #84 from microsoft/ci/dependabot-codeql-group #127

Workflow file for this run

name: Ruby
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
ruby-version: ['3.3', '3.4', '4.0', head, jruby, jruby-head, truffleruby, truffleruby-head]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
bundler: 'latest'
cache-version: 1
- name: Run tests
run: bundle exec rake
- name: Upload artifacts for ruby version 3 and ubuntu
if: ${{ matrix.os == 'ubuntu-latest' && matrix.ruby-version == '3.4'}}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: drop
path: |
./Gemfile.lock
./README.md
# The check-ruby-version-matrix returns success if all matrix jobs in build are successful; otherwise, it returns a failure.
# Use this as a PR status check for GitHub Policy Service instead of individual matrix entry checks.
check-ruby-version-matrix:
runs-on: ubuntu-latest
needs: [build]
if: always()
steps:
- name: All build matrix options are successful
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: One or more build matrix options failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1