-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (68 loc) · 1.88 KB
/
Copy pathquality-gate.yml
File metadata and controls
82 lines (68 loc) · 1.88 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Quality Gate
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
static-analysis:
name: Static Analysis & Linting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.4"
tools: composer, cs2pr
coverage: none
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: "20"
cache: "npm"
- name: Install Dependencies
run: |
composer install --prefer-dist --no-progress --no-suggest
npm ci
- name: ESLint
continue-on-error: true
run: npm run lint
- name: PHPStan / Psalm
continue-on-error: true
run: vendor/bin/psalm --output-format=github
- name: Security Audit (Composer)
continue-on-error: true
run: composer audit
security:
name: Security Scans
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Gitleaks
uses: zricethezav/gitleaks-action@v2
with:
args: detect --source . -v
tests:
name: Unit Tests
runs-on: ubuntu-latest
needs: static-analysis
steps:
- uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.4"
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
coverage: none
- name: Install Deps
run: composer install --prefer-dist --no-progress
- name: Run Tests
continue-on-error: true
run: php artisan test