-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (58 loc) · 1.78 KB
/
Copy pathtest.yml
File metadata and controls
66 lines (58 loc) · 1.78 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
name: Test install scripts
on:
push:
branches: [develop]
paths:
- 'content/programs/**'
- 'content/distros/**'
- 'content/dependencies/**'
- 'tests/**'
- '.github/workflows/test.yml'
pull_request:
paths:
- 'content/programs/**'
- 'content/distros/**'
- 'content/dependencies/**'
- 'tests/**'
- '.github/workflows/test.yml'
workflow_dispatch:
permissions:
contents: read
jobs:
test:
strategy:
matrix:
distro: [alpine, arch, debian, fedora, opensuse, ubuntu, void]
fail-fast: false
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: docker build -t lsg-test:${{ matrix.distro }} -f tests/docker/Dockerfile.${{ matrix.distro }} .
- name: Run tests
run: python3 tests/runner.py --distro ${{ matrix.distro }}
- name: Generate HTML report
if: always()
run: |
if [ -f report.json ]; then
python3 tests/report.py report.json --html -o report-${{ matrix.distro }}.html
else
echo "⚠️ No report.json — Docker build or test runner failed"
fi
- name: Generate Markdown summary
if: always()
run: |
if [ -f report.json ]; then
python3 tests/report.py report.json --markdown >> $GITHUB_STEP_SUMMARY
else
echo "## ⚠️ ${{ matrix.distro }} — build or runner failed, no report generated" >> $GITHUB_STEP_SUMMARY
fi
- name: Upload report (JSON)
if: always()
uses: actions/upload-artifact@v4
with:
name: report-${{ matrix.distro }}
path: |
report.json
report-${{ matrix.distro }}.html