Skip to content

Commit ac323e8

Browse files
committed
chore: update github actions
1 parent 56a6248 commit ac323e8

File tree

5 files changed

+80
-76
lines changed

5 files changed

+80
-76
lines changed

.github/actions/setup/action.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CI Setup
2+
description: "Sets up the environment for jobs during CI workflow"
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: 🐘 Setup PHP
8+
uses: shivammathur/setup-php@v2
9+
with:
10+
php-version: "8.2"
11+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick
12+
tools: composer:v2
13+
coverage: none
14+
- name: ℹ Setup Problem Matches
15+
shell: sh
16+
run: |
17+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
18+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
19+
- name: 🗂 Get composer cache directory
20+
id: composer-cache
21+
shell: sh
22+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
23+
- name: Cache dependencies
24+
uses: actions/cache@v3
25+
with:
26+
path: ${{ steps.composer-cache.outputs.dir }}
27+
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
28+
restore-keys: ${{ runner.os }}-composer-

.github/workflows/coding-standards.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/phpstan.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/quality.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Quality
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
pull_request:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
pint:
16+
runs-on: ubuntu-22.04
17+
steps:
18+
- name: 👀 Checkout
19+
uses: actions/checkout@v3
20+
- name: 🪄 Setup
21+
uses: ./.github/actions/setup
22+
- name: 🔮 Install Composer Dependencies
23+
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
24+
- name: 🕵️‍♂️ Run Laravel Pint
25+
run: composer lint -- --test
26+
27+
phpstan:
28+
runs-on: ubuntu-22.04
29+
steps:
30+
- name: 👀 Checkout
31+
uses: actions/checkout@v3
32+
- name: 🪄 Setup
33+
uses: ./.github/actions/setup
34+
- name: 🔮 Install Composer Dependencies
35+
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
36+
- name: 🕵️‍♂️ Run PHPStan
37+
run: composer test:phpstan -- --ansi --no-interaction --no-progress --error-format=github
38+
39+
composer:
40+
runs-on: ubuntu-22.04
41+
steps:
42+
- name: 👀 Checkout
43+
uses: actions/checkout@v3
44+
- name: 🪄 Setup
45+
uses: ./.github/actions/setup
46+
- name: 🕵️‍♂️ Run Composer Validate
47+
run: composer validate
48+
- name: 🕵️‍♂️ Run Composer Audit
49+
run: composer audit

composer.json

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,9 @@
101101
"post-create-project-cmd": [
102102
"@php artisan key:generate --ansi"
103103
],
104-
"pest": [
105-
"./vendor/bin/pest"
106-
],
107-
"pint": [
108-
"./vendor/bin/pint"
109-
],
110-
"stan": [
111-
"./vendor/bin/phpstan analyse --memory-limit=3g"
112-
],
113-
"test": [
114-
"@php artisan test"
115-
],
104+
"lint": "pint",
105+
"test:phpstan": "phpstan analyse --memory-limit=-1",
106+
"test": "pest",
116107
"models:doc": [
117108
"@php artisan ide-helper:models -F helpers/ModelHelper.php -M"
118109
],

0 commit comments

Comments
 (0)