Repository navigation
103 lines (88 loc) · 3.34 KB
/
Copy pathdev-cli.yml
File metadata and controls
103 lines (88 loc) · 3.34 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Development CLI
on:
push:
branches: [main]
paths:
- 'tools/dev-cli/**'
- 'Makefile'
- 'docker-compose*.yml'
- '.env.example'
- 'scripts/compose.sh'
- 'scripts/configure-model-proxy.sh'
- 'scripts/test-compose-profiles.sh'
- 'scripts/test-migrations.py'
- 'scripts/test-compose-up.py'
- 'scripts/test-backup.py'
- 'scripts/test-dockerfile-members.sh'
- 'ollama/pull-models.sh'
- 'scripts/test-pull-models.sh'
- 'manager/Dockerfile'
- 'runner/Cargo.toml'
- '.dockerignore'
- '.github/workflows/dev-cli.yml'
pull_request:
paths:
- 'tools/dev-cli/**'
- 'Makefile'
- 'docker-compose*.yml'
- '.env.example'
- 'scripts/compose.sh'
- 'scripts/configure-model-proxy.sh'
- 'scripts/test-compose-profiles.sh'
- 'scripts/test-migrations.py'
- 'scripts/test-compose-up.py'
- 'scripts/test-backup.py'
- 'scripts/test-dockerfile-members.sh'
- 'ollama/pull-models.sh'
- 'scripts/test-pull-models.sh'
- 'manager/Dockerfile'
- 'runner/Cargo.toml'
- '.dockerignore'
- '.github/workflows/dev-cli.yml'
permissions:
contents: read
jobs:
test:
name: CLI and migration commands
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
with:
toolchain: stable
components: clippy, rustfmt
- name: Install Python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: '3.13'
- name: Check formatting
run: cargo fmt --manifest-path tools/dev-cli/Cargo.toml --check
- name: Lint all CLI targets
run: cargo clippy --manifest-path tools/dev-cli/Cargo.toml --all-targets -- -D warnings
- name: Run CLI unit and integration tests
run: cargo test --manifest-path tools/dev-cli/Cargo.toml --all-targets
- name: Verify migration Make commands without Docker
run: python3 scripts/test-migrations.py
- name: Verify make up and make dev retire left-out profiles without Docker
run: python3 scripts/test-compose-up.py
- name: Verify profile selection and retirement against real Compose
run: |
docker compose version
sh scripts/test-compose-profiles.sh
- name: Verify backup and restore Make commands, also against throwaway Docker volumes
env:
ZONE_TEST_DOCKER: '1'
run: python3 scripts/test-backup.py
- name: Verify backup and restore Make commands under busybox sh, as an Alpine host runs them
run: >-
docker run --rm -v "$PWD:/zone:ro" -w /zone
alpine:3.24@sha256:294b683cb724975bec92580e1e685676bd4b50bda910ddb8c51d4cabeaec77e6
sh -c 'apk add --no-cache make python3 >/dev/null && python3 scripts/test-backup.py'
- name: Verify the manager Dockerfile copies every workspace member
run: sh scripts/test-dockerfile-members.sh
- name: Verify the Ollama pull script prints plain text to logs
run: sh scripts/test-pull-models.sh