Skip to content

Merge pull request #35 from hayat01sh1da/hayat01sh1da/ruby/split-targ… #76

Merge pull request #35 from hayat01sh1da/hayat01sh1da/ruby/split-targ…

Merge pull request #35 from hayat01sh1da/hayat01sh1da/ruby/split-targ… #76

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
name: Ruby
on:
push:
branches:
- master
paths:
- .github/actions/setup-ruby/action.yml
- .github/workflows/ruby.yml
- .ruby-version
- ruby/**/*.rb
- ruby/**/*.rbs
- ruby/Gemfile
- ruby/Gemfile.lock
- ruby/rubocop.yml
- ruby/rubocop_todo.yml
- ruby/Steepfile
pull_request:
paths:
- .github/actions/setup-ruby/action.yml
- .github/workflows/ruby.yml
- .ruby-version
- ruby/**/*.rb
- ruby/**/*.rbs
- ruby/Gemfile
- ruby/Gemfile.lock
- ruby/rubocop.yml
- ruby/rubocop_todo.yml
- ruby/Steepfile
permissions:
contents: read
pull-requests: read
jobs:
change-detection:
runs-on: ubuntu-latest
outputs:
ruby-changes: ${{ steps.change-detection.outputs.ruby }}
rubocop-changes: ${{ steps.change-detection.outputs.rubocop}}
steep-changes: ${{ steps.change-detection.outputs.steep}}
steps:
- uses: actions/checkout@v6
- name: Change Detection
uses: dorny/paths-filter@v4
id: change-detection
with:
filters: |
ruby:
- .github/actions/setup-ruby/action.yml
- .github/workflows/ruby.yml
- .ruby-version
- ruby/**/*.rb
- ruby/Gemfile
- ruby/Gemfile.lock
rubocop:
- .github/actions/setup-ruby/action.yml
- .github/workflows/ruby.yml
- .ruby-version
- ruby/**/*.rb
- ruby/Gemfile
- ruby/Gemfile.lock
- ruby/rubocop.yml
- ruby/rubocop_todo.yml
steep:
- .github/actions/setup-ruby/action.yml
- .github/workflows/ruby.yml
- .ruby-version
- ruby/**/*.rb
- ruby/**/*.rbs
- ruby/Gemfile
- ruby/Gemfile.lock
- ruby/Steepfile
minitest:
timeout-minutes: 10
runs-on: ubuntu-latest
needs: change-detection
if: needs.change-detection.outputs.ruby-changes == 'true'
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-ruby
with:
job-name: minitest
- name: Minitest
working-directory: ./ruby
run: ruby test/application_test.rb
rubocop:
timeout-minutes: 10
runs-on: ubuntu-latest
needs: change-detection
if: needs.change-detection.outputs.rubocop-changes == 'true'
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-ruby
with:
job-name: rubocop
- name: RuboCop
working-directory: ./ruby
run: bundle exec rubocop
steep:
timeout-minutes: 10
runs-on: ubuntu-latest
needs: change-detection
if: needs.change-detection.outputs.steep-changes == 'true'
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-ruby
with:
job-name: steep
- name: Steep
working-directory: ./ruby
run: |
bundle exec steep check app
bundle exec steep check test