File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed
Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI - Alles Checken
2+
3+ on :
4+ push :
5+ branches : [ "main", "master" ]
6+ pull_request :
7+ branches : [ "main", "master" ]
8+
9+ jobs :
10+ # 1. PHP Syntax Check (Linting)
11+ php-lint :
12+ runs-on : ubuntu-latest
13+ name : PHP Syntax Check
14+ steps :
15+ - name : Checkout Code
16+ uses : actions/checkout@v4
17+
18+ - name : Setup PHP
19+ uses : shivammathur/setup-php@v2
20+ with :
21+ php-version : ' 8.2'
22+ extensions : pdo, pdo_mysql
23+
24+ - name : Run PHP Lint
25+ run : |
26+ find . -name "*.php" -print0 | xargs -0 -n1 php -l
27+
28+ # 2. Docker Build Test
29+ docker-build :
30+ runs-on : ubuntu-latest
31+ name : Docker Build Test
32+ steps :
33+ - name : Checkout Code
34+ uses : actions/checkout@v4
35+
36+ - name : Set up Docker Buildx
37+ uses : docker/setup-buildx-action@v3
38+
39+ - name : Build Docker Image
40+ uses : docker/build-push-action@v5
41+ with :
42+ context : .
43+ file : ./Dockerfile
44+ push : false
45+ tags : router-game:test
46+
47+ # 3. Docker Compose Configuration Check
48+ compose-check :
49+ runs-on : ubuntu-latest
50+ name : Docker Compose Validation
51+ steps :
52+ - name : Checkout Code
53+ uses : actions/checkout@v4
54+
55+ - name : Validate Docker Compose Config
56+ run : docker compose config
You can’t perform that action at this time.
0 commit comments