Skip to content

Commit

Permalink
Further improve linting setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed Nov 14, 2023
1 parent 24f4cb5 commit 0fea6b6
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,27 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v4

- name: Fetch target branch
# If this action is not triggered from a PR, we use 'mampf-next' as default
# target branch to compare against. This might not cover all use cases.
# But in the end, one has to open a PR anyways and then the correct target
# branch is identified.
# TODO: rename to 'dev' when 'mampf-next' branch is renamed.
- name: Find target branch
run: |
echo "TARGET_BRANCH=${{ github.base_ref || 'mampf-next' }}" >> $GITHUB_ENV &&
echo "Target branch is: $TARGET_BRANCH" &&
git fetch origin $TARGET_BRANCH -- depth 1
echo "TARGET_BRANCH=${{ github.base_ref || 'mampf-next' }}" >> $GITHUB_ENV
- name: Fetch target branch (for later git diff)
run: |
echo "Fetching target branch: $TARGET_BRANCH" &&
git fetch origin $TARGET_BRANCH --depth 1
- name: Set up Ruby 3
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.4
bundler-cache: true

# Scope Rubocop to files:
# Scope Rubocop to changed files:
# https://robertfaldo.medium.com/commands-to-run-rubocop-and-specs-you-changed-in-your-branch-e6d2f2e4110b
- name: Run RuboCop
run: |
Expand Down

0 comments on commit 0fea6b6

Please sign in to comment.