Skip to content

Commit 1f853e0

Browse files
committed
ci: simplify
1 parent c513e46 commit 1f853e0

8 files changed

Lines changed: 74 additions & 79 deletions

File tree

.github/workflows/ci.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: CI
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
format:
7+
name: Format
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v4
12+
13+
- name: Run format check
14+
run: |
15+
docker run --rm -v $PWD:/app composer:2.7 sh -c \
16+
"composer install --profile --ignore-platform-reqs && composer format:check"
17+
18+
analyze:
19+
name: Analyze
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Run static analysis
26+
run: |
27+
docker run --rm -v $PWD:/app composer:2.7 sh -c \
28+
"composer install --profile --ignore-platform-reqs && composer analyze"
29+
30+
unit-tests:
31+
name: Unit Tests
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@v4
36+
with:
37+
submodules: recursive
38+
39+
- name: Run unit tests
40+
run: |
41+
docker run --rm -v $PWD:/app composer:2.7 sh -c \
42+
"composer install --profile --ignore-platform-reqs && composer test -- --testsuite unit"
43+
44+
e2e-tests:
45+
name: E2E Tests
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Checkout repository
49+
uses: actions/checkout@v4
50+
with:
51+
submodules: recursive
52+
53+
- name: Set up Docker Buildx
54+
uses: docker/setup-buildx-action@v3
55+
56+
- name: Build image
57+
uses: docker/build-push-action@v6
58+
with:
59+
context: .
60+
push: false
61+
tags: dns-dev
62+
load: true
63+
cache-from: type=gha
64+
cache-to: type=gha,mode=max
65+
66+
- name: Start DNS Server
67+
run: |
68+
docker compose up -d
69+
sleep 10
70+
71+
- name: Run E2E tests
72+
run: docker compose exec -T dns-server vendor/bin/phpunit --configuration phpunit.xml --testsuite e2e

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/linter.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"license": "MIT",
77
"minimum-stability": "stable",
88
"scripts": {
9-
"lint": "./vendor/bin/pint --test --config pint.json",
109
"format": "./vendor/bin/pint --config pint.json",
11-
"check": "./vendor/bin/phpstan analyse --level 8 -c phpstan.neon src tests",
10+
"format:check": "./vendor/bin/pint --test --config pint.json",
11+
"analyze": "./vendor/bin/phpstan analyse --level 8 -c phpstan.neon src tests",
1212
"test": "./vendor/bin/phpunit --configuration phpunit.xml"
1313
},
1414
"authors": [
File renamed without changes.

0 commit comments

Comments
 (0)