-
Notifications
You must be signed in to change notification settings - Fork 37
106 lines (95 loc) · 3.64 KB
/
conformance.yml
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
name: PHP Conformance CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
# Declare default permissions as read only.
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ '8.1','8.2','8.3' ]
name: PHP ${{ matrix.php-version }} Conformance Test
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
objects.githubusercontent.com:443
packagist.org:443
proxy.golang.org:443
repo.packagist.org:443
storage.googleapis.com:443
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2
with:
php-version: ${{ matrix.php-version }}
- name: Install Dependencies
uses: nick-invision/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
with:
timeout_minutes: 10
max_attempts: 3
command: composer install
- name: Setup Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: '1.20'
- name: Run HTTP conformance tests
uses: GoogleCloudPlatform/functions-framework-conformance/action@72a4f36b10f1c6435ab1a86a9ea24bda464cc262 # v1.8.6
env:
FUNCTION_TARGET: 'httpFunc'
FUNCTION_SIGNATURE_TYPE: 'http'
FUNCTION_SOURCE: ${{ github.workspace }}/tests/conformance/index.php
with:
functionType: 'http'
useBuildpacks: false
cmd: "'php -S localhost:8080 router.php'"
- name: Run Declarative HTTP conformance tests
uses: GoogleCloudPlatform/functions-framework-conformance/action@72a4f36b10f1c6435ab1a86a9ea24bda464cc262 # v1.8.6
env:
FUNCTION_TARGET: 'declarativeHttpFunc'
FUNCTION_SOURCE: ${{ github.workspace }}/tests/conformance/index.php
with:
functionType: 'http'
useBuildpacks: false
cmd: "'php -S localhost:8080 router.php'"
- name: Run Declarative Typed conformance tests
uses: GoogleCloudPlatform/functions-framework-conformance/action@72a4f36b10f1c6435ab1a86a9ea24bda464cc262 # v1.8.6
env:
FUNCTION_TARGET: 'declarativeTypedFunc'
FUNCTION_SOURCE: ${{ github.workspace }}/tests/conformance/index.php
with:
functionType: 'http'
declarativeType: 'typed'
useBuildpacks: false
cmd: "'php -S localhost:8080 router.php'"
- name: Run CloudEvent conformance tests
uses: GoogleCloudPlatform/functions-framework-conformance/action@72a4f36b10f1c6435ab1a86a9ea24bda464cc262 # v1.8.6
env:
FUNCTION_TARGET: 'cloudEventFunc'
FUNCTION_SIGNATURE_TYPE: 'cloudevent'
FUNCTION_SOURCE: ${{ github.workspace }}/tests/conformance/index.php
with:
functionType: 'cloudevent'
useBuildpacks: false
validateMapping: true
cmd: "'php -S localhost:8080 router.php'"
- name: Run Declarative CloudEvent conformance tests
uses: GoogleCloudPlatform/functions-framework-conformance/action@72a4f36b10f1c6435ab1a86a9ea24bda464cc262 # v1.8.6
env:
FUNCTION_TARGET: 'declarativeCloudEventFunc'
FUNCTION_SOURCE: ${{ github.workspace }}/tests/conformance/index.php
with:
functionType: 'cloudevent'
useBuildpacks: false
validateMapping: true
cmd: "'php -S localhost:8080 router.php'"