Skip to content

Commit f52ed91

Browse files
olehermanseclaude
andcommitted
tests: Added GH Action for running cfengine lint on policy from other repos
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
1 parent 6334be7 commit f52ed91

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This workflow checks that linting works on real policy in other repos
2+
# and ensures we fix errors in policy before merging new linting rules
3+
# to CFEngine CLI
4+
5+
name: Lint policy in other repos
6+
on:
7+
push:
8+
branches: [main]
9+
pull_request:
10+
branches: [main]
11+
workflow_dispatch:
12+
permissions:
13+
contents: read
14+
jobs:
15+
lint:
16+
runs-on: ubuntu-24.04
17+
steps:
18+
- name: Checkout cfengine-cli
19+
uses: actions/checkout@v4
20+
with:
21+
path: cfengine-cli
22+
- name: Checkout masterfiles
23+
uses: actions/checkout@v4
24+
with:
25+
repository: cfengine/masterfiles
26+
path: masterfiles
27+
- name: Checkout modules
28+
uses: actions/checkout@v4
29+
with:
30+
repository: cfengine/modules
31+
path: modules
32+
- name: Set up Python
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: "3.13"
36+
- name: Install dependencies
37+
run: |
38+
python -m pip install --upgrade pip
39+
python -m pip install uv
40+
(cd cfengine-cli && make install)
41+
- name: Run cfengine lint on masterfiles
42+
working-directory: cfengine-cli
43+
run: |
44+
uv run cfengine lint --strict no ../masterfiles
45+
uv run cfengine lint --strict no ../modules
46+
# TODO: Add documentation and core when ready

0 commit comments

Comments
 (0)