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

(maint) Use reusable static code analysis workflow #682

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 2 additions & 40 deletions .github/workflows/static_code_analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,8 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
static_code_analysis:
name: Run checks

env:
ruby_version: '2.7'

runs-on: 'ubuntu-20.04'
steps:
- name: Checkout current PR code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install ruby version ${{ env.ruby_version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.ruby_version }}

- name: Prepare testing environment with bundler
run: |
git config --global core.longpaths true
bundle config set --local without 'release'
bundle update --jobs 4 --retry 3

- name: Run commits check
run: bundle exec rake commits

- name: Run validate check
run: bundle exec rake validate

- name: Run lint check
run: bundle exec rake lint

- name: Run metadata_lint check
run: bundle exec rake metadata_lint

- name: Run syntax check
run: bundle exec rake syntax syntax:hiera syntax:manifests syntax:templates

- name: Run rubocop check
run: bundle exec rake rubocop
uses: "puppetlabs/phoenix-github-actions/.github/workflows/static_code_analysis.yaml@main"
25 changes: 0 additions & 25 deletions rakelib/commits.rake

This file was deleted.

Loading