-
Notifications
You must be signed in to change notification settings - Fork 4
44 lines (34 loc) · 1.31 KB
/
static_code_analysis.yaml
File metadata and controls
44 lines (34 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
name: Static Code Analysis
on: workflow_call
jobs:
static_code_analysis:
name: Run checks
env:
ruby_version: '3.3'
extra_checks: check:symlinks check:git_ignore check:dot_underscore check:test_file
PUPPET_FORGE_TOKEN: 'YES'
runs-on: 'ubuntu-latest'
steps:
- name: Checkout current PR code
uses: actions/checkout@v6
with:
fetch-depth: 0
# Patron, which is a transitive dependency of beaker-abs and Bolt, requires cURL libraries
- name: Install cURL development files
run: sudo apt install -y libcurl4-openssl-dev
- name: Install ruby version ${{ env.ruby_version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.ruby_version }}
bundler-cache: true
env:
BUNDLE_RUBYGEMS___PUPPETCORE__PUPPET__COM: forge-key:${{ secrets.PUPPET_FORGE_TOKEN_PUBLIC }}
- name: Run rubocop check
run: bundle exec rake ${{ env.extra_checks }} rubocop
- name: Run syntax check
run: bundle exec rake ${{ env.extra_checks }} syntax syntax:hiera syntax:manifests syntax:templates
- name: Run lint check
run: bundle exec rake ${{ env.extra_checks }} lint
- name: Run metadata_lint check
run: bundle exec rake ${{ env.extra_checks }} metadata_lint