-
-
Notifications
You must be signed in to change notification settings - Fork 6
49 lines (38 loc) · 1.48 KB
/
continuous-integration.yml
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
name: CI
on:
pull_request:
push:
env:
DOCKER_IMAGE_TAG: ${{ github.sha }}
MOUNT_APP_VOLUME_LOCATION: '/nowhere' # disables mounting volumes in `docker-compose.yml`
jobs:
images:
name: Build CI Images
runs-on: ubuntu-latest
steps:
- name: "Install BuildX"
uses: docker/setup-buildx-action@v3
- name: Checkout source code
uses: actions/checkout@v4
- name: "Build docker containers"
uses: docker/build-push-action@v6
with:
load: true
file: Dockerfile
context: .
push: false
tags: ghcr.io/ocramius/event-sourcing-workshop/sandbox:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: "Run static analysis"
run: docker-compose run --rm sandbox vendor/bin/psalm --no-progress --output-format=github
- name: "Run tests"
run: docker-compose run --rm sandbox vendor/bin/phpunit
- name: "Run coding style checks"
run: docker-compose run --rm sandbox vendor/bin/phpcs
- name: "Check component interdependencies"
run: docker-compose run --rm sandbox vendor/bin/deptrac --config-file components.depfile.yml
- name: "Check hexagonal layers interdependencies"
run: docker-compose run --rm sandbox vendor/bin/deptrac --config-file hexagonal-layers.depfile.yml
- name: "Run mutation tests"
run: docker-compose run --rm sandbox vendor/bin/roave-infection-static-analysis-plugin