-
-
Notifications
You must be signed in to change notification settings - Fork 427
71 lines (61 loc) · 2.12 KB
/
Copy pathtoolkit-lint-kits.yaml
File metadata and controls
71 lines (61 loc) · 2.12 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
name: Toolkit Lint Kits
defaults:
run:
shell: bash
on:
push:
branches-ignore:
- 'dependabot/**'
paths:
- 'src/Toolkit/**'
- '.github/workflows/toolkit-lint-kits.yaml'
pull_request:
paths:
- 'src/Toolkit/**'
- '.github/workflows/toolkit-lint-kits.yaml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: {}
jobs:
discover:
name: Discover kits
runs-on: ubuntu-latest
outputs:
kits: ${{ steps.set.outputs.kits }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- id: set
name: Build matrix from src/Toolkit/kits/*
run: |
KITS=$(find src/Toolkit/kits -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | sort | jq -R . | jq -sc .)
echo "Kits: $KITS"
echo "kits=$KITS" >> "$GITHUB_OUTPUT"
lint:
name: Lint ${{ matrix.kit }}
needs: discover
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
kit: ${{ fromJson(needs.discover.outputs.kits) }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: '8.4'
- name: Install Toolkit dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
working-directory: src/Toolkit
- name: Lint kit
working-directory: src/Toolkit
env:
COLUMNS: 120
KIT: ${{ matrix.kit }}
run: php bin/ux-toolkit-kit-lint --ansi --fail-on-warning "kits/$KIT"