-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (81 loc) · 2.88 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Pipeline-CI
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
ci:
runs-on: ubuntu-latest
continue-on-error: false
services:
mariadb:
image: 'mariadb:latest'
env:
MARIADB_USER: kreno
MARIADB_PASSWORD: kreno
MARIADB_ROOT_PASSWORD: kreno
MARIADB_DATABASE: kreno
ports:
- 3306:3306
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# https://github.com/shivammathur/setup-php (community)
- name: Setup PHP, extensions and composer with shivammathur/setup-php
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: mbstring, xml, ctype, iconv, intl, pdo, pdo_mysql, dom, filter, gd, iconv, json, mbstring, pdo
- name: Cache multiple paths
uses: actions/cache@v2
with:
path: |
vendor
key: ${{ runner.os }}-${{ hashFiles('composer.lock') }}
- name: "Composer install"
run: composer install --no-interaction --no-progress
# Install Symfony CLI
- name: Symfony CLI
run: |
echo 'deb [trusted=yes] https://repo.symfony.com/apt/ /' | sudo tee /etc/apt/sources.list.d/symfony-cli.list
sudo apt update
sudo apt install symfony-cli
# Yarn install
- name: Yarn install
uses: actions/setup-node@v2
with:
node-version: '14'
#registry-url: npm.fontawesome.com
- run: yarn install
#env:
#NODE_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}
#Yarn build
- name: Yarn build
run: yarn run encore production
# Check vulnerabilities
- name: Symfony Check Vulnerabilities
run: symfony check:security
# PHP CS FIXER
- name: PHP-CS-Fixer
run: |
composer require friendsofphp/php-cs-fixer
./vendor/bin/php-cs-fixer fix src --dry-run
# PHP STAN
- name: PHP Stan
run: |
./vendor/bin/simple-phpunit install
composer require phpstan/phpstan
composer require phpstan/extension-installer
composer config --no-plugins allow-plugins.phpstan/extension-installer true
composer require phpstan/phpstan-symfony
./vendor/bin/phpstan analyse src --memory-limit 1G
- name: Lint YAML files
run: ./bin/console lint:yaml config --parse-tags
- name: Lint Twig templates
run: ./bin/console lint:twig templates --env=test
- name: Lint Parameters and Services
run: ./bin/console lint:container --no-debug
- name: Lint Doctrine entities
run: ./bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction
- name: PHP Unit
run: ./bin/phpunit