-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (56 loc) · 1.39 KB
/
ci-pipeline.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Test app console
on:
pull_request:
permissions:
contents: read
env:
MYSQL_ROOT_PASSWORD: changeme
MYSQL_DATABASE: demo
MYSQL_USER: regular
MYSQL_PASSWORD: changeme
jobs:
build:
runs-on: ubuntu-latest
services:
db:
image: mysql
env:
MYSQL_ROOT_PASSWORD: ${{ env.MYSQL_ROOT_PASSWORD }}
MYSQL_USER: ${{ env.MYSQL_USER }}
MYSQL_PASSWORD: ${{ env.MYSQL_PASSWORD }}
ports:
- 3306:3306
steps:
- name: Add hosts to /etc/hosts
run: |
sudo echo "127.0.0.1 db" | sudo tee -a /etc/hosts
- uses: actions/checkout@v2
- uses: actions/cache@v3
id: vendor-cache
with:
key: vendor-${{ hashFiles('app/composer.lock') }}
path: app/vendor
- name: Install dependencies
uses: php-actions/composer@v6
with:
working_dir: app/
# Validate app console
- name: Validate app-console
run: bin/console
working-directory: app/
# Code style
- name: Check code style
run: bin/test-codestyle
working-directory: app/
# Generators
- name: Check generators
run: bin/test-generators
working-directory: app/
# PHP Stan
- name: PHP Stan
run: bin/test-phpstan
working-directory: app/
# Schema
- name: PHP Schema
run: bin/test-schema
working-directory: app/