-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (56 loc) · 1.8 KB
/
test-ubuntu.yml
File metadata and controls
64 lines (56 loc) · 1.8 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
name: Test Ubuntu Bootstrap
on:
push:
branches: [ main ]
paths:
- 'ubuntu/**'
- 'generic/**'
- 'bootstrap'
- '.github/workflows/test-ubuntu.yml'
pull_request:
branches: [ main ]
paths:
- 'ubuntu/**'
- 'generic/**'
- 'bootstrap'
workflow_dispatch:
jobs:
shellcheck:
name: ShellCheck Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ShellCheck
run: |
sudo apt-get update && sudo apt-get install -y shellcheck
find ubuntu/ generic/ -type f ! -name "*.md" -exec shellcheck -x --severity=error {} \;
shellcheck -x --severity=error bootstrap
docker-test:
name: Docker Test (Ubuntu ${{ matrix.ubuntu-version }})
runs-on: ubuntu-latest
strategy:
matrix:
ubuntu-version: ['24.04', '25.10']
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Build test image
run: |
docker build \
--build-arg UBUNTU_VERSION=${{ matrix.ubuntu-version }} \
-f test/docker/Dockerfile.ubuntu-noninteractive \
-t ubuntu-bootstrap-test:${{ matrix.ubuntu-version }} \
.
- name: Run bootstrap tests
run: |
docker run --rm ubuntu-bootstrap-test:${{ matrix.ubuntu-version }}
- name: Test individual scripts
run: |
docker run --rm ubuntu-bootstrap-test:${{ matrix.ubuntu-version }} bash -c "
cd /home/testuser/linux-bootstrap && \
bash -n ubuntu/bootstrap && \
bash -n ubuntu/install-essential-packages && \
bash -n ubuntu/install-dev-packages && \
bash -n ubuntu/install-desktop-packages && \
echo 'All syntax checks passed'
"