Repository navigation
94 lines (74 loc) · 2.07 KB
/
Copy pathtest.yml
File metadata and controls
94 lines (74 loc) · 2.07 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Tests
on:
push:
branches: [ '**', '!dependabot/**' ]
pull_request_target:
types: [ opened, edited, reopened, synchronize, unlocked ]
permissions: read-all
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { submodules: recursive }
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
tools: php-cs-fixer, cs2pr
- name: Composer Install
uses: ./.github/actions/composer-install
- name: Pint
run: composer lint -- --test
env:
PHP_CS_FIXER_IGNORE_ENV: 1
mix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { submodules: recursive }
- uses: bahmutov/npm-install@v1
- name: Mix
run: npm run build
- name: Upload Compiled Resources
uses: actions/upload-artifact@v4
with:
name: mix
path: public/build
tests:
runs-on: ubuntu-latest
needs: mix
steps:
- uses: actions/checkout@v4
with: { submodules: recursive }
- name: Setup PHP
uses: shivammathur/setup-php@v2
with: { php-version: 8.4 }
- name: Composer Install
uses: ./.github/actions/composer-install
- name: Prepare Laravel
uses: ./.github/actions/prepare-laravel
- name: Download Mix Resources
uses: actions/download-artifact@v4
with: { name: mix, path: public/build }
- name: Run PEST
run: php artisan test --coverage --coverage-clover coverage.xml
- name: Upload Coverage Report
if: success()
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.xml
- name: Upload Logs
if: failure()
uses: actions/upload-artifact@v4
with: { name: logs, path: storage/logs }
clean-up:
runs-on: ubuntu-latest
if: ${{ always() }}
needs: [tests]
steps:
- uses: geekyeggo/delete-artifact@v5
with:
name: mix
failOnError: false