-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (38 loc) · 1.12 KB
/
ci.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: Continuous Integration
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
tests:
name: Run the tests suite
runs-on: ubuntu-latest
env:
APP_ENV: 'test'
steps:
# Install official version of docker that correctly supports from-cache option in docker compose
- name: Set up Docker
uses: crazy-max/ghaction-setup-docker@v3
with:
set-host: true
# Docker socket path is different when using setup docker
- name: Set Docker Socket Host
run: echo "DOCKER_SOCKET_PATH=${DOCKER_HOST:5}" >> $GITHUB_ENV
- name: Log in to registry
shell: bash
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Checkout
uses: actions/checkout@v4
- name: Setup Castor
uses: castor-php/[email protected]
- name: "Build and start the infrastructure"
run: castor start
- name: CS
run: castor cs
- name: PHPStan
run: castor phpstan
- name: PHPUnit
run: castor phpunit