-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (49 loc) · 1.65 KB
/
test.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
name: Run tests
on:
pull_request:
branches:
- main
jobs:
tests:
name: Run tests
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:10.11
env:
MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_USER: stufis_ci
MYSQL_DATABASE: stufis_ci
MYSQL_PASSWORD: password
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
matrix:
php-versions: [ '8.2' ]
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, dom, fileinfo, mysql, libxml, xml, xmlwriter, dom, tokenizer, filter, json, phar, pcre, openssl, pdo, intl, curl
coverage: xdebug
- name: Run composer install
run: |
composer config http-basic.composer.fluxui.dev ${{secrets.FLUXUI_USERNAME}} ${{secrets.FLUXUI_PASSWORD}}
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Prepare Laravel Application
run: |
cp .env.ci .env.testing
php artisan key:generate --env=testing
- name: Verify mariadb connection
run: |
sudo apt install mariadb-client
mariadb --version
mariadb --host localhost --port 3306 -ustufis_ci -ppassword -e "SHOW DATABASES"
- name: Run Migration
run: php artisan migrate -v --seed --env=testing
- name: Test with phpunit
run: php artisan test --coverage