Skip to content

Set the show_relevant_organisations feature flag #1958

Set the show_relevant_organisations feature flag

Set the show_relevant_organisations feature flag #1958

Workflow file for this run

name: "Ruby CI"
on:
pull_request:
branches: [main]
paths:
- "**.rb"
- "**Gemfile"
- "**Rakefile"
- ".github/workflows/ruby-ci.yml"
- "infra/**"
- ".mise.toml"
merge_group:
types: [checks_requested]
push:
branches: [main]
jobs:
setup:
name: "Setup"
runs-on: ubuntu-24.04-arm
outputs:
ruby-version: ${{ steps.set-ruby-version.outputs.ruby-version }}
spec-matrix: ${{ steps.build-matrix.outputs.spec-matrix }}
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Initialise mise and cache `hcl2json`
uses: jdx/mise-action@dad1bfd3df957f44999b559dd69dc1671cb4e9ea # v4.2.1
with:
install_args: hcl2json
- name: Set Ruby version
id: set-ruby-version
run: |
echo "ruby-version=$(mise current ruby)" >> "$GITHUB_OUTPUT"
- name: Build spec matrix
id: build-matrix
run: |
spec_dirs_json="$(find . -type d -name 'spec' -not -path '*vendor*' | sed 's|/spec$||g' | jq -Rnc '[inputs]')"
echo "spec-matrix=$spec_dirs_json" >> "$GITHUB_OUTPUT"
ruby-lint:
name: "Ruby Lint"
runs-on: ubuntu-24.04-arm
needs: setup
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install Ruby and gems at root
uses: ruby/setup-ruby@003a5c4d8d6321bd302e38f6f0ec593f77f06600 # v1.319.0
with:
bundler-cache: true
ruby-version: ${{needs.setup.outputs.ruby-version}}
- name: Run rubocop
run: make lint_ruby
ruby-spec:
name: "Rspec"
runs-on: ubuntu-24.04-arm
needs: setup
strategy:
fail-fast: false
matrix:
spec_target: ${{ fromJSON(needs.setup.outputs.spec-matrix) }}
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up hcl2json
uses: jdx/mise-action@dad1bfd3df957f44999b559dd69dc1671cb4e9ea # v4.2.1
with:
install_args: hcl2json
- name: "Install Ruby and gems in ${{matrix.spec_target}}"
uses: ruby/setup-ruby@003a5c4d8d6321bd302e38f6f0ec593f77f06600 # v1.319.0
with:
bundler-cache: true
ruby-version: ${{needs.setup.outputs.ruby-version}}
working-directory: "${{matrix.spec_target}}"
- name: Run specs
run: |
cd "${{matrix.spec_target}}"
bundle exec rspec