Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: CI

on: [pull_request]

jobs:
format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Run format check
run: |
docker run --rm -v $PWD:/app composer:2.7 sh -c \
"composer install --profile --ignore-platform-reqs && composer format:check"

analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Run static analysis
run: |
docker run --rm -v $PWD:/app composer:2.7 sh -c \
"composer install --profile --ignore-platform-reqs && composer analyze"

unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Run unit tests
run: |
docker run --rm -v $PWD:/app composer:2.7 sh -c \
"composer install --profile --ignore-platform-reqs && composer test -- --testsuite unit"

e2e-tests:
name: E2E Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build image
uses: docker/build-push-action@v6
with:
context: .
push: false
tags: dns-dev
load: true
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Start DNS Server
run: |
docker compose up -d
sleep 10

- name: Run E2E tests
run: docker compose exec -T dns-server vendor/bin/phpunit --configuration phpunit.xml --testsuite e2e
20 changes: 0 additions & 20 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/linter.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/tests.yml

This file was deleted.

4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"license": "MIT",
"minimum-stability": "stable",
"scripts": {
"lint": "./vendor/bin/pint --test --config pint.json",
"format": "./vendor/bin/pint --config pint.json",
"check": "./vendor/bin/phpstan analyse --level 8 -c phpstan.neon src tests",
"format:check": "./vendor/bin/pint --test --config pint.json",
"analyze": "./vendor/bin/phpstan analyse --level 8 -c phpstan.neon src tests",
"test": "./vendor/bin/phpunit --configuration phpunit.xml"
},
"authors": [
Expand Down