Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/actions/setup-mise/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Set up mise Ruby toolchain
description: >-
Install all the CI matrix Rubies via mise with the per-version bundler pins from
.mise.ci.toml (MISE_ENV=ci) — the same toolchain bin/test and bin/relock use.
Config + cache key are shared across every caller (the *_test workflows and
update_lockfiles), so they all restore the one weekly-populated cache.

runs:
using: composite
steps:
- uses: jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d # v4.2.0
env:
MISE_ENV: ci
MISE_JOBS: "2"
with:
install: true
cache: true

# Precompiled rubies bake a nonexistent build path into RbConfig["PKG_CONFIG"]
# (jdx/ruby#48), breaking native gems like sqlite3. Reset it to PATH's pkg-config.
- name: Fix baked PKG_CONFIG path in precompiled rubies
shell: bash
run: |
find ~/.local/share/mise/installs/ruby -name rbconfig.rb \
-exec sed -i 's#\(CONFIG\["PKG_CONFIG"\] = \).*#\1"pkg-config"#' {} +
73 changes: 73 additions & 0 deletions .github/workflows/gem_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Gem Test

# Reusable, gem-agnostic test workflow. tests.yml invokes it once per gem via a
# central matrix, passing the gem dir plus whatever optional service/packages
# that gem needs. The per-cell matrix still comes from each gem's
# test-matrix.json (the single source of truth), expanded here and run via
# bin/test — so adding/removing a cell never touches this file.

on:
workflow_call:
inputs:
gem:
description: Gem directory to test (e.g. sentry-ruby).
required: true
type: string
apt:
description: Space-separated apt packages to install before testing.
type: string
default: ""

jobs:
matrix:
runs-on: ubuntu-latest
outputs:
include: ${{ steps.set.outputs.include }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- id: set
run: echo "include=$(jq -c . ${{ inputs.gem }}/test-matrix.json)" >> "$GITHUB_OUTPUT"

test:
needs: matrix
defaults:
run:
working-directory: ${{ inputs.gem }}
name: ${{ toJson(matrix) }}
runs-on: ubuntu-latest
timeout-minutes: 10
services:
redis:
image: ghcr.io/getsentry/image-mirror-library-redis:7.0.8-bullseye
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.matrix.outputs.include) }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Install apt packages
if: inputs.apt != ''
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends ${{ inputs.apt }}
Comment thread
sl0thentr0py marked this conversation as resolved.

- name: Set up Ruby
uses: ./.github/actions/setup-mise

- name: Run specs
env:
MATRIX_ENTRY: ${{ toJson(matrix) }}
run: ruby ../bin/test --entry "$MATRIX_ENTRY" --rake

- name: Upload Coverage
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
73 changes: 0 additions & 73 deletions .github/workflows/sentry_delayed_job_test.yml

This file was deleted.

68 changes: 0 additions & 68 deletions .github/workflows/sentry_opentelemetry_test.yml

This file was deleted.

69 changes: 0 additions & 69 deletions .github/workflows/sentry_rails_test.yml

This file was deleted.

82 changes: 0 additions & 82 deletions .github/workflows/sentry_resque_test.yml

This file was deleted.

Loading
Loading