-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
48 lines (42 loc) · 1.2 KB
/
action.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
name: Laravel Test Runner
author: halaslabs
description: "This action will run your Laravel application's test suite."
branding:
color: 'purple'
icon: 'crosshair'
inputs:
php-version:
description: 'PHP version to install'
required: false
default: '8.2'
setup:
description: 'If false, setup-php will not be run'
required: false
default: 'true'
runs:
using: composite
steps:
- if: inputs.setup == 'true'
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php-version }}
- name: Install Dependencies
run: |
composer install --no-progress --prefer-dist --optimize-autoloader
shell: bash
- name: Prepare
run: |
echo "::group::PHP Modules"
php -m
echo "::endgroup::"
php -r "file_exists('.env') || copy('.env.example', '.env');"
php artisan key:generate
shell: bash
- name: Test Run
run: |
php artisan test --without-tty | tee test_results
echo '```' >> $GITHUB_STEP_SUMMARY
cat test_results >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
shell: bash