-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #694 from openSUSE/ci-rubocop
Run the Rubocop CI check only when a Ruby file is changed
- Loading branch information
Showing
3 changed files
with
55 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: "CI - Rubocop" | ||
|
||
on: | ||
push: | ||
paths: | ||
# NOTE: GitHub Actions do not allow using YAML references, the same path | ||
# list is used below for the pull request event. Keep both lists in sync!! | ||
|
||
# this file as well | ||
- .github/workflows/ci-rubocop.yml | ||
# Rubocop configuration | ||
- service/.rubocop.yml | ||
# all Ruby files | ||
- service/Gemfile | ||
- service/bin/** | ||
- service/**.rb | ||
|
||
pull_request: | ||
paths: | ||
# NOTE: GitHub Actions do not allow using YAML references, the same path | ||
# list is used above for the push event. Keep both lists in sync!! | ||
|
||
# this file as well | ||
- .github/workflows/ci-rubocop.yml | ||
# Rubocop configuration | ||
- service/.rubocop.yml | ||
# all Ruby files | ||
- service/Gemfile | ||
- service/bin/** | ||
- service/**.rb | ||
|
||
jobs: | ||
rubocop: | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
working-directory: ./service | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
distro: [ "leap_latest" ] | ||
|
||
container: | ||
image: registry.opensuse.org/yast/head/containers_${{matrix.distro}}/yast-ruby | ||
|
||
steps: | ||
|
||
- name: Git Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Rubocop | ||
run: /usr/bin/rubocop.*-1.24.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters