-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (53 loc) · 1.9 KB
/
lint.yaml
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
name: Lint
on:
pull_request:
branches:
- main
- develop
jobs:
build:
uses: './.github/workflows/build.yaml'
php-lint:
needs: [ build ]
# See https://docs.github.com/en/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job#standard-github-hosted-runners-for-public-repositories
runs-on: ubuntu-24.04
environment: testing
strategy:
matrix:
operating-system: [ ubuntu-24.04 ]
# Limited by https://github.com/shivammathur/setup-php#github-hosted-runners
php-version: [ '8.2', '8.3', '8.4' ]
dependency-stability: [ prefer-stable ]
name: php-lint - PHP ${{ matrix.php-version }} (${{ matrix.operating-system }})
steps:
- uses: actions/checkout@v4.1.7
- name: Install PHP
uses: shivammathur/setup-php@2.31.1
with:
php-version: ${{ matrix.php-version }}
- name: Restore vendor from Cache
uses: actions/cache@v4.0.2
id: vendor-cache
with:
path: vendor
key: ${{ runner.OS }}-build-php${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
- name: Run Pint (Laravel linter)
run: ./vendor/bin/pint --bail
npm-lint:
needs: [ build ]
# See https://docs.github.com/en/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job#standard-github-hosted-runners-for-public-repositories
runs-on: ubuntu-24.04
environment: testing
name: npm-lint - PHP 8.3 (ubuntu-24.04)
steps:
- uses: actions/checkout@v4.1.7
- name: Setup Node
uses: actions/setup-node@v4.0.4
with:
node-version: 20
cache: 'npm'
- name: Install Node Dependencies
# TODO: Test, whether --ignore-scripts work here, as this is helping in hardening (preventing postinstall scripts)
run: npm ci
- name: Run Prettier (Frontend linter)
run: npm run lint:check