Skip to content

Commit 82870ff

Browse files
authored
(Update) GitHub actions (#4571)
1 parent b22e1a3 commit 82870ff

9 files changed

+765
-547
lines changed
+37-37
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
name: Compile Assets (Vite)
2-
on: [push, pull_request]
2+
on: [ push, pull_request ]
33
jobs:
4-
build-assets:
5-
strategy:
6-
matrix:
7-
operating-system:
8-
- ubuntu-22.04
9-
php-version:
10-
- '8.4'
11-
name: ${{ matrix.operating-system }}
12-
runs-on: ${{ matrix.operating-system }}
13-
steps:
14-
- name: Checkout
15-
uses: actions/checkout@v4
16-
with:
17-
fetch-depth: 0
18-
- name: Setup PHP 8.4
19-
uses: shivammathur/setup-php@v2
20-
with:
21-
php-version: ${{ matrix.php-version }}
22-
extensions: curl, dom, gd, libxml, mbstring, zip, mysql, xml, intl, bcmath, redis-phpredis/phpredis@6.0.1
23-
ini-values: error_reporting=E_ALL
24-
coverage: pcov
25-
tools: composer:v2
26-
env:
27-
REDIS_CONFIGURE_OPTS: --enable-redis
28-
- name: Configure Bun
29-
uses: oven-sh/setup-bun@v1
30-
with:
31-
bun-version: latest
32-
- name: Install Composer Dependencies
33-
env:
34-
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
35-
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --optimize-autoloader
36-
- name: Install JS Dependencies
37-
run: bun install
38-
- name: Compile Assets (Vite)
39-
run: bun run build
4+
build-assets:
5+
strategy:
6+
matrix:
7+
operating-system:
8+
- ubuntu-22.04
9+
php-version:
10+
- '8.4'
11+
name: php ${{ matrix.php-version }} on ${{ matrix.operating-system }}
12+
runs-on: ${{ matrix.operating-system }}
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
- name: Setup PHP 8.4
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: ${{ matrix.php-version }}
22+
extensions: curl, dom, gd, libxml, mbstring, zip, mysql, xml, intl, bcmath, redis-phpredis/phpredis@6.0.1
23+
ini-values: error_reporting=E_ALL
24+
coverage: pcov
25+
tools: composer:v2
26+
env:
27+
REDIS_CONFIGURE_OPTS: --enable-redis
28+
- name: Configure Bun
29+
uses: oven-sh/setup-bun@v1
30+
with:
31+
bun-version: latest
32+
- name: Install Composer Dependencies
33+
env:
34+
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
35+
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --optimize-autoloader
36+
- name: Install JS Dependencies
37+
run: bun install
38+
- name: Compile Assets (Vite)
39+
run: bun run build

.github/workflows/greetings.yml

-13
This file was deleted.

.github/workflows/larastan.yml

+58-58
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,60 @@
11
name: PHP Static Analysis (Larastan)
2-
on: [push, pull_request]
2+
on: [ push, pull_request ]
33
jobs:
4-
test:
5-
strategy:
6-
matrix:
7-
operating-system:
8-
- ubuntu-22.04
9-
php-version:
10-
- '8.4'
11-
name: php ${{ matrix.php-version }} on ${{ matrix.operating-system }}
12-
services:
13-
mysql:
14-
image: mysql:8.0
15-
env:
16-
MYSQL_ALLOW_EMPTY_PASSWORD: yes
17-
MYSQL_DATABASE: unit3d
18-
ports:
19-
- 3306:3306
20-
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
21-
redis:
22-
image: redis:5.0
23-
ports:
24-
- 6379:6379
25-
options: >-
26-
--health-cmd "redis-cli ping"
27-
--health-interval 10s
28-
--health-timeout 5s
29-
--health-retries 5
30-
runs-on: ${{ matrix.operating-system }}
31-
steps:
32-
- name: Checkout
33-
uses: actions/checkout@v4
34-
with:
35-
fetch-depth: 0
36-
- name: Setup PHP 8.4
37-
uses: shivammathur/setup-php@v2
38-
with:
39-
php-version: ${{ matrix.php-version }}
40-
extensions: bcmath, ctype, dom, fileinfo, json, libxml, mbstring, openssl, pdo, tokenizer, xml, zip
41-
coverage: none
42-
- name: Install Composer Dependencies
43-
env:
44-
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
45-
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
46-
- name: Prepare The Laravel Environment
47-
run: cp .env.example .env
48-
- name: Generate Application Key
49-
run: php artisan key:generate
50-
- name: Clear Application Cache
51-
run: php artisan optimize:clear
52-
- name: Run Larastan
53-
run: ./vendor/bin/phpstan analyse -vvv --memory-limit=2G
54-
- name: Cache phpstan cache directory
55-
uses: actions/cache@v4
56-
with:
57-
path: .phpstan.cache
58-
key: "phpstan-cache-${{ github.run_id }}"
59-
restore-keys: |
60-
phpstan-cache-
4+
test:
5+
strategy:
6+
matrix:
7+
operating-system:
8+
- ubuntu-22.04
9+
php-version:
10+
- '8.4'
11+
name: php ${{ matrix.php-version }} on ${{ matrix.operating-system }}
12+
runs-on: ${{ matrix.operating-system }}
13+
services:
14+
mysql:
15+
image: mysql:8.0
16+
env:
17+
MYSQL_ALLOW_EMPTY_PASSWORD: yes
18+
MYSQL_DATABASE: unit3d
19+
ports:
20+
- 3306:3306
21+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
22+
redis:
23+
image: redis:5.0
24+
ports:
25+
- 6379:6379
26+
options: >-
27+
--health-cmd "redis-cli ping"
28+
--health-interval 10s
29+
--health-timeout 5s
30+
--health-retries 5
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
with:
35+
fetch-depth: 0
36+
- name: Setup PHP 8.4
37+
uses: shivammathur/setup-php@v2
38+
with:
39+
php-version: ${{ matrix.php-version }}
40+
extensions: bcmath, ctype, dom, fileinfo, json, libxml, mbstring, openssl, pdo, tokenizer, xml, zip
41+
coverage: none
42+
- name: Install Composer Dependencies
43+
env:
44+
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
45+
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
46+
- name: Prepare The Laravel Environment
47+
run: cp .env.example .env
48+
- name: Generate Application Key
49+
run: php artisan key:generate
50+
- name: Clear Application Cache
51+
run: php artisan optimize:clear
52+
- name: Run Larastan
53+
run: ./vendor/bin/phpstan analyse -vvv --memory-limit=2G
54+
- name: Cache phpstan cache directory
55+
uses: actions/cache@v4
56+
with:
57+
path: .phpstan.cache
58+
key: "phpstan-cache-${{ github.run_id }}"
59+
restore-keys: |
60+
phpstan-cache-

.github/workflows/lint.yml

+30-30
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
name: PHP Lint (Pint)
2-
on: [push, pull_request]
2+
on: [ push, pull_request ]
33
jobs:
4-
build-assets:
4+
pint:
55
strategy:
66
matrix:
77
operating-system:
88
- ubuntu-22.04
99
php-version:
1010
- '8.4'
11-
name: ${{ matrix.operating-system }}
11+
name: php ${{ matrix.php-version }} on ${{ matrix.operating-system }}
1212
runs-on: ${{ matrix.operating-system }}
1313
steps:
14-
- name: Checkout
15-
uses: actions/checkout@v4
16-
with:
17-
fetch-depth: 0
18-
- name: Setup PHP 8.4
19-
uses: shivammathur/setup-php@v2
20-
with:
21-
php-version: ${{ matrix.php-version }}
22-
extensions: curl, dom, gd, libxml, mbstring, zip, mysql, xml, intl, bcmath, redis-phpredis/phpredis@6.0.1
23-
ini-values: error_reporting=E_ALL
24-
coverage: pcov
25-
tools: composer:v2
26-
env:
27-
REDIS_CONFIGURE_OPTS: --enable-redis
28-
- name: Install Composer Dependencies
29-
env:
30-
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
31-
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --optimize-autoloader
32-
- name: Run Pint
33-
run: ./vendor/bin/pint
34-
- name: Commit Changes
35-
uses: stefanzweifel/git-auto-commit-action@v5
36-
with:
37-
commit_message: PHP Style Change (Laravel Pint CI)
38-
commit_user_name: HDVinne
39-
commit_user_email: hdinnovations@protonmail.com
40-
commit_author: HDVinnie <hdinnovations@protonmail.com>
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
- name: Setup PHP 8.4
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: ${{ matrix.php-version }}
22+
extensions: curl, dom, gd, libxml, mbstring, zip, mysql, xml, intl, bcmath, redis-phpredis/phpredis@6.0.1
23+
ini-values: error_reporting=E_ALL
24+
coverage: pcov
25+
tools: composer:v2
26+
env:
27+
REDIS_CONFIGURE_OPTS: --enable-redis
28+
- name: Install Composer Dependencies
29+
env:
30+
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
31+
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --optimize-autoloader
32+
- name: Run Pint
33+
run: ./vendor/bin/pint
34+
- name: Commit Changes
35+
uses: stefanzweifel/git-auto-commit-action@v5
36+
with:
37+
commit_message: "automation: laravel pint ci"
38+
commit_user_name: unit3d-bot
39+
commit_user_email: unit3d_gh_bot@protonmail.com
40+
commit_author: unit3d-bot <unit3d_gh_bot@protonmail.com>

0 commit comments

Comments
 (0)