Skip to content

daily-rubygems

daily-rubygems #1679

name: daily-rubygems
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
contents: read
jobs:
daily_rubygems:
name: Rubygems (${{ matrix.ruby }})
runs-on: ${{ matrix.os }}
if: github.repository == 'rubygems/rubygems'
strategy:
fail-fast: false
matrix:
os: [ ubuntu-24.04 ]
ruby: [ ruby-head, truffleruby-head ]
include:
- { os: windows-2022, ruby: mswin }
env:
TRUFFLERUBYOPT: "--experimental-options --testing-rubygems"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Ruby
uses: ruby/setup-ruby@2654679fe7f7c29875c669398a8ec0791b8a64a1 # v1.215.0
with:
ruby-version: ${{ matrix.ruby }}
bundler: none
- name: Show Ruby version
run: ruby --version
- name: Configure bindgen
shell: pwsh
run: |
echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
echo "BINDGEN_EXTRA_CLANG_ARGS=$((gcm clang).source -replace "bin\clang.exe","include")" >> $env:GITHUB_ENV
if: matrix.ruby == 'mswin'
- name: Test rubygems
run: |
bin/rake setup
bin/rake test
- name: Get previous status
if: always()
run: echo "OLD_STATUS=$(curl -sS 'https://api.github.com/repos/rubygems/rubygems/actions/workflows/daily-rubygems.yml/runs?event=schedule&branch=master' | jq '.workflow_runs | .[1].conclusion')" >> $GITHUB_ENV
- uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
with:
status: ${{ job.status }}
fields: repo,message,commit,action,workflow
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
if: failure() && env.OLD_STATUS == '"success"'
timeout-minutes: 60