-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (52 loc) · 1.87 KB
/
Copy pathci.yml
File metadata and controls
63 lines (52 loc) · 1.87 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
name: CI
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.2', '8.3', '8.4']
steps:
- uses: actions/checkout@v7
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
- uses: actions/setup-node@v6
with:
node-version: '24'
- run: composer install --prefer-dist --no-interaction
# Hermetic: regenerates from the committed spec, so this verifies that the committed
# generated code still reproduces from it, with no network dependency. Refreshing the
# spec itself is the release workflow's job.
- name: Codegen drift check
if: matrix.php == '8.2'
env:
ROXYAPI_SPEC_FILE: specs/openapi.json
run: |
node scripts/generate.mjs
git diff --exit-code -- specs/openapi.json src/Generated src/Roxy.php src/Version.php tests/Generated \
|| { echo 'codegen drift: commit the regenerated files'; exit 1; }
# Unlike the TS, Go and .NET generators, scripts/generate.mjs does NOT sync docs, so this
# cannot be folded into the step above. Without it a --no-verify push lands drifted
# README/AGENTS with nothing to catch it.
- name: Docs drift check
if: matrix.php == '8.2'
run: |
node scripts/sync-docs.mjs
git diff --exit-code -- README.md AGENTS.md \
|| { echo 'docs drift: commit the regenerated README.md/AGENTS.md'; exit 1; }
- name: Lint
if: matrix.php == '8.2'
run: vendor/bin/pint --test
- name: Static analysis
if: matrix.php == '8.2'
run: vendor/bin/phpstan analyse --no-progress --memory-limit=512M
- name: Test
run: vendor/bin/pest --no-coverage