-
Notifications
You must be signed in to change notification settings - Fork 42
84 lines (65 loc) · 2.15 KB
/
ci.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
name: Run CI
on:
push:
branches: [ main ]
paths-ignore:
- '**.md' # Do not need to run CI for markdown changes.
pull_request:
branches: [ main ]
paths-ignore:
- '**.md'
jobs:
linux-build:
runs-on: ubuntu-latest
services:
wiremock:
image: wiremock/wiremock
ports:
- 8080:8080
strategy:
fail-fast: false
matrix:
php-version: [8.1, 8.2]
use-lowest-dependencies: [true, false]
env:
LD_INCLUDE_INTEGRATION_TESTS: 1
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # If you only need the current version keep this.
- uses: ./.github/actions/ci
with:
php-version: ${{ matrix.php-version }}
use-lowest-dependencies: ${{ matrix.use-lowest-dependencies }}
token: ${{ secrets.GITHUB_TOKEN }}
windows-build:
runs-on: windows-latest
strategy:
matrix:
php-version: [8.1.26, 8.2.13]
env:
LD_INCLUDE_INTEGRATION_TESTS: 1
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # If you only need the current version keep this.
- name: Install java support
run: choco install -y javaruntime
- name: Install php support
run: choco install -y php --version=${{ matrix.php-version }} --force
- name: Install composer
run: choco install -y composer
- name: Download wiremock
run: Invoke-WebRequest -Uri https://repo1.maven.org/maven2/com/github/tomakehurst/wiremock-jre8-standalone/2.31.0/wiremock-jre8-standalone-2.31.0.jar -UseBasicParsing -OutFile wiremock.jar
- name: Verify checksum
shell: bash
run: |
[ "$(sha256sum wiremock.jar | awk '{ print $1 }')" == "c5cd526e04c57293ec847d845733b017c4052d2132653332e05a54272934a305" ]
- name: Start wiremock
run: cmd /c "START /b java -jar ./wiremock.jar"
- name: Wait for wiremock to be available
run: PowerShell -Command Start-Sleep -Seconds 5
- name: Install dependencies
run: composer install --no-progress
- name: Run tests
run: .\vendor\bin\phpunit