-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (79 loc) · 2.46 KB
/
Copy pathci.yml
File metadata and controls
96 lines (79 loc) · 2.46 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
94
95
96
name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
php:
name: php ${{ matrix.php }} · ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
php: ["8.3", "8.4"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Skip if bootstrap not run
id: precheck
run: |
if [ ! -f composer.json ]; then
echo "skip=true" >> "$GITHUB_OUTPUT"
echo "::notice::composer.json not present yet — see INITIALIZE.md"
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi
- name: Setup PHP
if: steps.precheck.outputs.skip == 'false'
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, xml, ctype, json, pdo, sqlite, pdo_sqlite, intl
coverage: none
- name: Install
if: steps.precheck.outputs.skip == 'false'
run: composer install --prefer-dist --no-progress --no-interaction
- name: Pint (lint)
if: steps.precheck.outputs.skip == 'false'
run: ./vendor/bin/pint --test
- name: Copy .env
if: steps.precheck.outputs.skip == 'false'
run: cp .env.example .env
- name: APP_KEY
if: steps.precheck.outputs.skip == 'false'
run: php artisan key:generate
- name: Passport keys
if: steps.precheck.outputs.skip == 'false'
run: php artisan passport:keys --force
- name: PHPUnit (tests)
if: steps.precheck.outputs.skip == 'false'
run: ./vendor/bin/phpunit
node:
name: node 22 · assets
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Skip if bootstrap not run
id: precheck
run: |
if [ ! -f package.json ]; then
echo "skip=true" >> "$GITHUB_OUTPUT"
echo "::notice::package.json not present yet — see INITIALIZE.md"
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi
- uses: actions/setup-node@v6
if: steps.precheck.outputs.skip == 'false'
with:
node-version: "22"
cache: npm
- run: npm ci
if: steps.precheck.outputs.skip == 'false'
- run: npm run build
if: steps.precheck.outputs.skip == 'false'