Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gem CI workflow: Don't run rubocop multiple times #99

Open
bastelfreak opened this issue Jun 28, 2024 · 3 comments
Open

gem CI workflow: Don't run rubocop multiple times #99

bastelfreak opened this issue Jun 28, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@bastelfreak
Copy link

Use Case

At the moment the [gem_ci](https://github.com/puppetlabs/cat-github-actions/blob/main/.github/workflows/gem_ci.yml#L61 workflow runs the rubocop rake task multiple times. I think this should be updated. This check doesn't depend on the ruby/puppet version in the CI job. At Vox Pupuli we use something like this pattern:

jobs:
  rubocop:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install Ruby ${{ matrix.ruby }}
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: "3.3"
          bundler-cache: true
      - name: Run Rubocop
        run: bundle exec rake rubocop
  test:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        ruby:
          - "2.7"
          - "3.0"
          - "3.1"
          - "3.2"
          - "3.3"
    name: Ruby ${{ matrix.ruby }}
    steps:
      - uses: actions/checkout@v4
      - name: Install Ruby ${{ matrix.ruby }}
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true
      - name: Run tests
        run: bundle exec rake --rakefile Rakefile_ci -T | grep release
      - name: Verify gem builds
        run: gem build --strict --verbose *.gemspec

This defines a rubocop job outside of the matrix.

Describe the Solution You Would Like

Run rubocop only once.

Describe Alternatives You've Considered

Additional Context

@bastelfreak bastelfreak added the enhancement New feature or request label Jun 28, 2024
@jordanbreen28
Copy link
Contributor

hey @bastelfreak - we agree, thanks for highlighting that to us. We can't say when we will get round to implementing this, so we'll leave this issue open for now as a reminder. Thanks

@jordanbreen28 jordanbreen28 closed this as completed by moving to Done in DevX Community Triage Jul 5, 2024
@bastelfreak
Copy link
Author

we'll leave this issue open for now as a reminder

Then why did you close it? :D

@jordanbreen28
Copy link
Contributor

we'll leave this issue open for now as a reminder

Then why did you close it? :D

Whoops 🤣 coffee hadn't kicked in

@jordanbreen28 jordanbreen28 reopened this Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

2 participants