Repository navigation
122 lines (93 loc) · 3.71 KB
/
Copy pathtests.yml
File metadata and controls
122 lines (93 loc) · 3.71 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
name: tests
on:
push:
branches:
- 0.4
pull_request:
permissions:
contents: read
env:
RUN_BLOCKING_TESTS: true
jobs:
linux_tests:
runs-on: ubuntu-latest
timeout-minutes: 20
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
strategy:
fail-fast: false
matrix:
php: ["8.4", "8.5"]
name: PHP ${{ matrix.php }} (Swoole 6.2.2)
container:
image: ghcr.io/hypervel/components-ci:php${{ matrix.php }}-swoole6.2.2
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Log trigger context
uses: ./.github/actions/log-trigger-context
- name: Cache Composer dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: /root/.composer/cache
key: composer-${{ matrix.php }}-${{ hashFiles('composer.lock') }}
restore-keys: composer-${{ matrix.php }}-
- name: Install dependencies
run: |
COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist -n -o
- name: Check code style
run: PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --dry-run --diff
- name: Run framework test suite
run: vendor/bin/paratest -c phpunit.xml.dist
- name: Run Permission suite with the database cache store
run: CACHE_STORE=database vendor/bin/paratest -c phpunit.xml.dist tests/Permission
- name: Run Testbench package-mode suite
run: php src/testbench/bin/testbench package:test --parallel tests/Testbench
# Local equivalent: composer test:dogfood. Direct commands bypass Composer's process timeout in CI.
- name: Install Testbench dogfood package dependencies
working-directory: dogfood/testbench-package
run: COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist -n -o
- name: Run Testbench dogfood package suite
working-directory: dogfood/testbench-package
env:
OTEL_SDK_DISABLED: true
run: vendor/bin/testbench package:test --parallel
wayfinder_tests:
runs-on: ubuntu-latest
timeout-minutes: 20
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
name: Wayfinder
container:
image: ghcr.io/hypervel/components-ci:php8.4-swoole6.2.2
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Log trigger context
uses: ./.github/actions/log-trigger-context
- name: Cache Composer dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: /root/.composer/cache
key: composer-8.4-${{ hashFiles('composer.lock') }}
restore-keys: composer-8.4-
- name: Install Composer dependencies
run: COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist -n -o
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
- name: Install pnpm
run: |
corepack enable
corepack prepare pnpm@10.24.0 --activate
- name: Install Node dependencies
run: pnpm install --frozen-lockfile
- name: Run Wayfinder tests
run: pnpm test:wayfinder
- name: Run Wayfinder tests against cached routes
run: pnpm test:wayfinder:cached
- name: Type-check generated Wayfinder output
run: pnpm typecheck:wayfinder