Repository navigation
68 lines (56 loc) · 1.64 KB
/
Copy pathci.yml
File metadata and controls
68 lines (56 loc) · 1.64 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
name: CI
"on":
push:
branches:
- main
pull_request:
# shipmill's release workflow and publish.yml run these checks on the commit they release
workflow_call:
inputs:
ref:
type: string
required: true
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
ref: ${{ inputs.ref }}
- uses: astral-sh/setup-uv@v10.1.0
with:
python-version: "3.14"
- name: Install dependencies
run: uv sync
- name: Lint
run: uv run ruff check .
- name: Type-check
run: uv run mypy
- name: Test
run: uv run pytest
- name: Demo
working-directory: demo
run: |
uv sync
uv run mypy
uv run pytest
- name: Validate example state
run: uv run cloudfall config validate --project config/examples
- name: Render Ansible inventory
run: >-
uv run cloudfall-engine inventory render --project config/examples
--output tmp/ansible-inventory.json
- name: Ansible syntax checks
env:
ANSIBLE_CONFIG: engine/ansible/ansible.cfg
run: |
for playbook in baseline bootstrap data deploy domains health inspect logging restart rollback services time; do
uv run ansible-playbook --syntax-check \
--inventory config/examples/tmp/ansible-inventory.json \
"engine/ansible/playbooks/${playbook}.yml"
done
- name: Ansible lint
env:
ANSIBLE_CONFIG: engine/ansible/ansible.cfg
run: uv run ansible-lint engine/ansible