Skip to content

Commit 59d1c30

Browse files
committed
Add code style test
1 parent 823b47e commit 59d1c30

File tree

3 files changed

+40
-5
lines changed

3 files changed

+40
-5
lines changed

.github/workflows/pint.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: PHPUnit
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Validate composer.json and composer.lock
21+
run: composer validate --strict
22+
23+
- name: Cache Composer packages
24+
id: composer-cache
25+
uses: actions/cache@v3
26+
with:
27+
path: vendor
28+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
29+
restore-keys: |
30+
${{ runner.os }}-php-
31+
32+
- name: Install dependencies
33+
run: composer install --prefer-dist --no-progress
34+
35+
- name: Run code style check
36+
run: vendor/bin/pint --test

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
"illuminate/contracts": "^9.0 | ^10.0",
1919
"twig/twig": "^3.0"
2020
},
21+
"require-dev": {
22+
"laravel/pint": "^1.4",
23+
"orchestra/testbench": "^7.19"
24+
},
2125
"extra": {
2226
"laravel": {
2327
"providers": [
@@ -42,9 +46,5 @@
4246
"optimize-autoloader": true,
4347
"preferred-install": "dist",
4448
"sort-packages": true
45-
},
46-
"require-dev": {
47-
"laravel/pint": "^1.4",
48-
"orchestra/testbench": "^7.19"
4949
}
5050
}

tests/Commands/GenerateQuestions/Choices/PhpVersionTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace BlameButton\LaravelDockerBuilder\Tests\Commands\GenerateQuestions\Choices;
44

5-
use BlameButton\LaravelDockerBuilder\Commands\GenerateQuestions\Choices\NodePackageManager;
65
use BlameButton\LaravelDockerBuilder\Commands\GenerateQuestions\Choices\PhpVersion;
76
use BlameButton\LaravelDockerBuilder\Tests\TestCase;
87

0 commit comments

Comments
 (0)