-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (42 loc) · 1.33 KB
/
qa-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
name: QA Pipeline
on:
push:
branches:
- main
jobs:
qa-pipeline:
name: QA Pipeline
runs-on: ubuntu-latest
env: # Global environment variables for this job
DATABASE_URL: "sqlite:///:memory:"
steps:
# Step 1: Set up the repository
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Set up PHP
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer
extensions: sqlite3
# Step 3: Install dependencies
- name: Install Composer Dependencies
run: composer install --prefer-dist --no-progress --no-suggest --no-interaction
# Step 4: Create the test database schema
- name: Prepare Test Database
run: |
php bin/console doctrine:schema:create --env=test --no-interaction
# Step 5: Validate the test database schema
- name: Validate Test Database
run: |
php bin/console doctrine:schema:validate --env=test --no-interaction
# Step 6: Run PHP-CS-Fixer
- name: Run PHP-CS-Fixer
run: vendor/bin/php-cs-fixer fix --dry-run --diff
# Step 7: Run PHPStan
- name: Run PHPStan
run: vendor/bin/phpstan analyse
# Step 8: Run PHPUnit
- name: Run Test Suite
run: vendor/bin/phpunit