-
Notifications
You must be signed in to change notification settings - Fork 8
73 lines (70 loc) · 1.97 KB
/
tests.yaml
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: Run Tests
on: push
env:
APP_ENV: test
APP_STORAGE_PATH: "${{ github.workspace }}/tests/fixtures"
DATABASE_URL: mysql://dudenamedben:[email protected]:3306/noagenda?serverVersion=8
SYMFONY_DEPRECATIONS_HELPER: disabled
jobs:
run-tests:
name: Run Tests
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.1']
services:
database:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: InTheMorning
MYSQL_DATABASE: noagenda_test
MYSQL_USER: dudenamedben
MYSQL_PASSWORD: dudettenamedbernadette
ports:
- 3306:3306
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up PHP
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php-version }}
extensions: imagick
tools: composer:v2
-
name: Set Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
-
name: Cache Composer
uses: actions/[email protected]
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}
restore-keys: ${{ matrix.php-version }}-composer-
-
name: Install Composer dependencies
run: composer install --no-progress
-
name: Set up database
run: |
bin/console doctrine:migrations:migrate --no-interaction
bin/console messenger:setup-transports
bin/console doctrine:fixtures:load --no-interaction
-
name: Set up Node
uses: actions/setup-node@v1
-
name: Install NPM dependencies
run: npm ci
-
name: Build assets
run: npm run build
-
name: Run PHP tests
run: bin/phpunit -v
-
name: Run Node tests
run: npm run test