-
-
Notifications
You must be signed in to change notification settings - Fork 45
86 lines (67 loc) · 2.1 KB
/
Copy pathtests.yml
File metadata and controls
86 lines (67 loc) · 2.1 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
name: Tests
on:
push:
branches: [main, dev]
pull_request:
jobs:
ci:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.4]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare Composer cache directory
run: mkdir -p ~/.composer/cache
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: ~/.composer/cache
key: composer-${{ runner.os }}-${{ hashFiles('composer.lock') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, mbstring, zip
tools: composer:v2
coverage: xdebug
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '26'
- name: Install PHP dependencies
run: composer install --no-interaction --prefer-dist --optimize-autoloader --ansi
- name: Cache Pest type coverage
uses: actions/cache@v4
with:
path: vendor/pestphp/pest-plugin-type-coverage/.temp
key: pest-type-coverage-${{ runner.os }}-${{ hashFiles('composer.lock') }}
- name: Get NPM cache directory
id: npm-cache-dir
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- name: Cache Node dependencies
id: npm-cache
uses: actions/cache@v4
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Node dependencies
run: npm ci
- name: Lint frontend
run: npm run lint
- name: Check frontend formatting
run: npm run format
- name: Build frontend
run: npm run build
- name: Typecheck frontend
run: npm run typecheck
- name: Prepare Laravel
run: |
cp .env.example .env
php artisan key:generate
- name: Run linters, static analysis, and tests
run: composer ci