Repository navigation
180 lines (148 loc) · 4.53 KB
/
Copy pathci.yml
File metadata and controls
180 lines (148 loc) · 4.53 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
name: CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
push:
branches:
- master
jobs:
tests:
name: Tests / ${{ matrix.sdk }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: ['8.5']
sdk: [
Android5Java17,
Android16Java17,
CLIGo126,
CLIWasm,
CLIWasmBrowser,
DartBeta,
DartStable,
DotNet60,
DotNet80,
DotNet90,
FlutterStable,
FlutterBeta,
FlutterWeb,
Go113,
Go118,
KotlinJava17,
Node26,
Node20,
PHP85,
Python39,
Python310,
Python311,
Python312,
Python313,
Ruby27,
Ruby30,
Ruby31,
Ruby40,
Rust185,
AppleSwift61,
Swift61,
# TODO: Re-enable Unity2021 after the CI Unity license is restored.
WebChromium,
WebNode,
ReactNative,
ReactNativeAndroid
]
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: recursive
- name: Docker Setup Buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
with:
# docker-container driver isolates the mock-server build and flakes
# when many matrix jobs hit Packagist/GitHub at once.
driver: docker
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: ${{ matrix.php-version }}
extensions: curl
- name: Before Install
run: |
if [ ! -z "${DOCKERHUB_PULL_USERNAME:-}" ]; then
echo "${DOCKERHUB_PULL_PASSWORD}" | docker login --username "${DOCKERHUB_PULL_USERNAME}" --password-stdin
fi
- name: Install
run: |
docker --version
composer install
- name: Run Tests
run: composer test tests/e2e/${{ matrix.sdk }}Test.php
generation:
name: Checks / Generation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: '8.5'
extensions: curl
- name: Install
run: composer install
- name: Run Tests
run: composer test -- --testsuite Generation
lint:
name: Checks / Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: '8.5'
extensions: curl
- name: Install
run: composer install
- name: Lint
run: composer lint
refactor:
name: Checks / Refactor
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: '8.5'
extensions: curl
- name: Install
run: composer install
- name: Run Rector
run: composer refactor:check
twig-lint:
name: Checks / Twig
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
- name: Run djLint
# Pinned: djlint 1.41.0+ false-positives T038 on multi-line {% if %} tags
run: uvx djlint==1.40.10 templates/ --lint
max-line-length:
name: Checks / Twig line length
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Make script executable
run: chmod +x ./.github/scripts/max-line-length.sh
- name: Check max lines
run: ./.github/scripts/max-line-length.sh . 1200 "*.twig"