Repository navigation
52 lines (45 loc) · 1.92 KB
/
Copy pathstatic-analysis.yml
File metadata and controls
52 lines (45 loc) · 1.92 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
name: Static analysis
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
pint:
name: Pint
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0
with:
php-version: '8.4'
coverage: none
- name: Resolve composer cache directory
id: composer-cache
shell: bash
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
- name: Restore composer cache
uses: actions/cache@v6
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
restore-keys: composer-${{ runner.os }}-${{ matrix.php }}-
- name: Drop cached laranail archives
# laranail/* resolve through a single MOVING v0.1.0 tag, so composer's dist
# cache is keyed on a name whose contents change underneath it. A restored
# archive is then silently stale: the install reports success and unpacks
# whatever was cached the first time. Everything else is immutable per
# version and stays cached.
# POSIX command via bash: Windows runners default to PowerShell, where this
# would be a parse error rather than a no-op.
shell: bash
run: rm -rf "$(composer config cache-files-dir)/laranail"
- run: composer update --prefer-dist --no-interaction
# laranail-pint, not bare pint: it resolves the ONE shared config in
# vendor/laranail/package-tools and errors if it is absent. Bare `pint`
# silently falls back to its own defaults and exits 0, so this step was
# reporting "clean" against a rule set no other package here uses.
- run: vendor/bin/laranail-pint --test