-
Notifications
You must be signed in to change notification settings - Fork 204
129 lines (113 loc) · 3.31 KB
/
tests.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: "Tests"
on:
pull_request:
branches:
- "v*.*"
- "master"
- "feature/*"
push:
branches:
- "v*.*"
- "master"
- "feature/*"
jobs:
tests:
name: "Tests"
runs-on: "${{ matrix.os }}"
strategy:
fail-fast: true
matrix:
os:
- "ubuntu-20.04"
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
- "8.4"
mongodb-version:
- "4.4"
topology:
- "server"
include:
- os: "ubuntu-20.04"
php-version: "8.0"
mongodb-version: "6.0"
topology: "replica_set"
- os: "ubuntu-20.04"
php-version: "8.0"
mongodb-version: "6.0"
topology: "sharded_cluster"
- os: "ubuntu-20.04"
php-version: "8.0"
mongodb-version: "4.4"
topology: "replica_set"
- os: "ubuntu-20.04"
php-version: "8.0"
mongodb-version: "4.4"
topology: "sharded_cluster"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
with:
submodules: true
- id: setup-mongodb
uses: mongodb-labs/drivers-evergreen-tools@master
with:
version: ${{ matrix.mongodb-version }}
topology: ${{ matrix.topology }}
- name: "Build Driver"
id: build-driver
uses: ./.github/actions/linux/build
with:
version: ${{ matrix.php-version }}
- name: "Run Tests"
run: TEST_PHP_ARGS="-q -x --show-diff -g FAIL,XFAIL,BORK,WARN,LEAK,SKIP" make test
env:
MONGODB_URI: ${{ steps.setup-mongodb.outputs.cluster-uri }}
pecl-test:
name: "Test PECL package"
runs-on: "ubuntu-latest"
env:
PHP_VERSION: "8.3"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
with:
submodules: true
- name: "Build Driver"
id: build-driver
uses: ./.github/actions/linux/build
with:
version: ${{ env.PHP_VERSION }}
- name: "Write changelog file for packaging"
run: echo "Testing" > changelog
- name: "Build package.xml"
run: "make package.xml RELEASE_NOTES_FILE=$(pwd)/changelog"
- name: "Build PECL package"
run: "make package"
# PECL always uses the version for the package name.
# Read it from the version file and store in env to use when uploading artifacts
- name: "Read current package version"
run: |
PACKAGE_VERSION=$(./bin/update-release-version.php get-version)
echo "PACKAGE_VERSION=${PACKAGE_VERSION}" >> "$GITHUB_ENV"
echo "PACKAGE_FILE=mongodb-${PACKAGE_VERSION}.tgz" >> "$GITHUB_ENV"
- name: "Install release archive to verify correctness"
run: sudo pecl install ${{ env.PACKAGE_FILE }}
test-windows:
name: "Windows Tests"
uses: ./.github/workflows/windows-tests.yml
with:
php: ${{ matrix.php }}
arch: ${{ matrix.arch }}
ts: ${{ matrix.ts }}
secrets: inherit
strategy:
fail-fast: false
matrix:
# Note: keep this in sync with the Windows matrix in package-release.yml
php: [ "7.4", "8.0", "8.1", "8.2", "8.3", "8.4" ]
arch: [ x64, x86 ]
ts: [ ts, nts ]