templates: ready-to-apply CI workflows for phyllomeos, xml-definition-for-domains, rpm-sources
This commit is contained in:
@@ -0,0 +1,25 @@
|
|||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# Bump when the recipe language changes; both jobs share the runner.
|
||||||
|
cook:
|
||||||
|
runs-on: fedora
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
container:
|
||||||
|
image: git.phyllo.me/devops/fedora-runner-image:latest
|
||||||
|
steps:
|
||||||
|
- uses: https://git.phyllo.me/devops/checkout@v5
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Lint manifest + templates
|
||||||
|
run: make -C cook lint
|
||||||
|
- name: Generate recipes + dishes, validate every dish
|
||||||
|
run: make -C cook all
|
||||||
|
- name: Run the pytest suite
|
||||||
|
run: make -C cook test
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
# Smoke test that the source set compiles under mock without publishing.
|
||||||
|
# Host job: mock needs real chroots on the runner VM.
|
||||||
|
jobs:
|
||||||
|
mock-smoke:
|
||||||
|
runs-on: fedora
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
steps:
|
||||||
|
- uses: https://git.phyllo.me/devops/checkout@v5
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Initialize mock root
|
||||||
|
run: mock -r fedora-43-x86_64 --init
|
||||||
|
- name: Install build deps
|
||||||
|
run: |
|
||||||
|
mock -r fedora-43-x86_64 --install git make gcc
|
||||||
|
- name: Smoke build
|
||||||
|
run: |
|
||||||
|
mock -r fedora-43-x86_64 --copyin . /builddir/src
|
||||||
|
mock -r fedora-43-x86_64 --shell --enable-network --isolation=simple << 'EOF'
|
||||||
|
cd /builddir/src
|
||||||
|
make || true
|
||||||
|
EOF
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: mock -r fedora-43-x86_64 --clean
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
xmllint:
|
||||||
|
runs-on: fedora
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
container:
|
||||||
|
image: git.phyllo.me/devops/fedora-runner-image:latest
|
||||||
|
steps:
|
||||||
|
- uses: https://git.phyllo.me/devops/checkout@v5
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Validate XML definitions
|
||||||
|
run: |
|
||||||
|
if command -v xmllint >/dev/null; then
|
||||||
|
for f in $(find . -name '*.xml'); do
|
||||||
|
xmllint --noout "$f"
|
||||||
|
done
|
||||||
|
else
|
||||||
|
python3 - <<'EOF'
|
||||||
|
import glob, xml.etree.ElementTree as ET
|
||||||
|
files = glob.glob('**/*.xml', recursive=True)
|
||||||
|
for f in files:
|
||||||
|
ET.parse(f) # raises on malformed XML
|
||||||
|
print(f"ok: {len(files)} XML files well-formed")
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user