Repository navigation
79 lines (67 loc) · 2.14 KB
/
Copy pathtest-factory.yml
File metadata and controls
79 lines (67 loc) · 2.14 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
name: Test Feel++ Factory
run-name: "Test Factory [${{ github.event_name }}]"
on:
pull_request:
paths:
- 'src/feelpp/docker/factory/**'
- 'feelpp-env/config/**'
- 'feelpp-env/templates/**'
- 'pyproject.toml'
- '.github/workflows/test-factory.yml'
workflow_dispatch:
jobs:
test-factory:
runs-on: ubuntu-latest
name: Test Factory Configuration
steps:
- uses: actions/checkout@v5
- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Setup Python environment
run: |
uv venv .venv
source .venv/bin/activate
uv pip install -e .
- name: Validate configuration
run: |
.venv/bin/feelpp-factory validate
- name: Show configuration
run: |
.venv/bin/feelpp-factory show --variant feelpp-env
- name: Generate all Dockerfiles
run: |
.venv/bin/feelpp-factory generate --output-dir feelpp-env/test-output
- name: Verify ninja-build in all Dockerfiles
run: |
echo "Checking for ninja-build in generated Dockerfiles..."
for dockerfile in feelpp-env/test-output/*/Dockerfile; do
if ! grep -q "ninja-build" "$dockerfile"; then
echo "ERROR: ninja-build missing in $dockerfile"
exit 1
fi
echo "✓ $dockerfile has ninja-build"
done
- name: Verify auxiliary files
run: |
echo "Checking for auxiliary files..."
for dir in feelpp-env/test-output/*/; do
for file in Dockerfile bashrc.feelpp feelpp.conf.sh start.sh WELCOME; do
if [ ! -f "$dir/$file" ]; then
echo "ERROR: $file missing in $dir"
exit 1
fi
done
echo "✓ $dir has all required files"
done
- name: Generate build matrix
run: |
echo "Build matrix:"
.venv/bin/feelpp-factory matrix
- name: Lint Dockerfiles
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: feelpp-env/test-output/*/Dockerfile
recursive: true
failure-threshold: warning