Fix CI workflow: configure markdownlint, fix Node version, add Ansible validation
This commit is contained in:
parent
f3b34f3c95
commit
990f886f02
@ -24,22 +24,25 @@ jobs:
|
|||||||
run: npm run test:links
|
run: npm run test:links
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
build-and-test:
|
ansible-validation:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
container:
|
container:
|
||||||
image: node:20-bullseye
|
image: python:3.11-slim
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install Ansible and linting tools
|
||||||
run: npm ci
|
run: |
|
||||||
|
pip install --no-cache-dir ansible ansible-lint yamllint
|
||||||
|
|
||||||
- name: Lint
|
- name: Validate YAML syntax
|
||||||
run: npm run lint
|
run: |
|
||||||
|
echo "Checking YAML syntax..."
|
||||||
|
find . -name "*.yml" -o -name "*.yaml" | grep -v ".git" | while read file; do
|
||||||
|
python3 -c "import yaml; yaml.safe_load(open('$file'))" || exit 1
|
||||||
|
done
|
||||||
|
|
||||||
- name: Test
|
- name: Run ansible-lint
|
||||||
run: npm test
|
run: ansible-lint
|
||||||
|
continue-on-error: true
|
||||||
- name: Check formatting
|
|
||||||
run: npm run lint
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
"markdownlint-cli2": "^0.18.1"
|
"markdownlint-cli2": "^0.18.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=22.0.0",
|
"node": ">=20.0.0",
|
||||||
"npm": ">=10.0.0"
|
"npm": ">=10.0.0"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user