-
-
Notifications
You must be signed in to change notification settings - Fork 16
62 lines (51 loc) · 1.52 KB
/
test_suite.yaml
File metadata and controls
62 lines (51 loc) · 1.52 KB
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
name: Code Test Suite
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
tests:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.4
env:
MYSQL_DATABASE: mpm_testing
MYSQL_ROOT_PASSWORD: 6QVlQsfsjUbxoaTS
ports:
- 53306:3306
redis:
image: redis:5
ports:
- 6379:6379
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: mbstring, dom, fileinfo, mysql
coverage: xdebug
- name: Install Composer Dependencies
run: composer install --no-interaction --prefer-dist
working-directory: ./src/backend
- name: Generate autoload files
run: |
OUTPUT=$(composer dump-autoload 2>&1)
echo "$OUTPUT"
if echo "$OUTPUT" | grep -q "does not comply with psr-4 autoloading standard"; then
echo "❌ PSR-4 autoloading violation detected."
exit 1
fi
working-directory: ./src/backend
- name: Run Migrations Test
run: php artisan --env=testing migrate:fresh
working-directory: ./src/backend
- name: Run Migrations Rollback Test
run: php artisan --env=testing migrate:rollback
working-directory: ./src/backend
- name: Run Tests
run: php artisan test --stop-on-failure
working-directory: ./src/backend
continue-on-error: false