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
|
||||
continue-on-error: true
|
||||
|
||||
build-and-test:
|
||||
ansible-validation:
|
||||
runs-on: self-hosted
|
||||
container:
|
||||
image: node:20-bullseye
|
||||
image: python:3.11-slim
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Install Ansible and linting tools
|
||||
run: |
|
||||
pip install --no-cache-dir ansible ansible-lint yamllint
|
||||
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
- name: Validate YAML syntax
|
||||
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
|
||||
run: npm test
|
||||
|
||||
- name: Check formatting
|
||||
run: npm run lint
|
||||
- name: Run ansible-lint
|
||||
run: ansible-lint
|
||||
continue-on-error: true
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
"markdownlint-cli2": "^0.18.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.0.0",
|
||||
"node": ">=20.0.0",
|
||||
"npm": ">=10.0.0"
|
||||
},
|
||||
"keywords": [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user