-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (53 loc) · 1.76 KB
/
ci.yml
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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
name: Run lint
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
coverage: xdebug
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
with:
path: node_modules
key: npm-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
npm-cache-
- name: Install node dependencies
if: steps.cache-npm.outputs.cache-hit != 'true'
run: npm ci
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ hashFiles('**/composer.lock') }}
restore-keys: composer-
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install php dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Run php lint
run: ./vendor/bin/pint --test
- name: Run blade formatter check
run: npx blade-formatter --check-formatted --diff "resources/**/*.blade.php"
shell: bash
- name: Run prettier
run: npx prettier --check resources/**/*.js resources/**/*.css *.js *.md .github/**/*.yml
shell: bash