Skip to content

Commit 6e70d07

Browse files
authored
Add test job to build and install PECL package (#1559)
1 parent 21d46fe commit 6e70d07

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/tests.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,41 @@ jobs:
7272
run: TEST_PHP_ARGS="-q -x --show-diff -g FAIL,XFAIL,BORK,WARN,LEAK,SKIP" make test
7373
env:
7474
MONGODB_URI: ${{ steps.setup-mongodb.outputs.cluster-uri }}
75+
76+
pecl-test:
77+
name: "Test PECL package"
78+
runs-on: "ubuntu-latest"
79+
env:
80+
PHP_VERSION: "8.3"
81+
82+
steps:
83+
- name: "Checkout"
84+
uses: "actions/checkout@v4"
85+
with:
86+
submodules: true
87+
88+
- name: "Build Driver"
89+
id: build-driver
90+
uses: ./.github/actions/linux/build
91+
with:
92+
version: ${{ env.PHP_VERSION }}
93+
94+
- name: "Write changelog file for packaging"
95+
run: echo "Testing" > changelog
96+
97+
- name: "Build package.xml"
98+
run: "make package.xml RELEASE_NOTES_FILE=$(pwd)/changelog"
99+
100+
- name: "Build PECL package"
101+
run: "make package"
102+
103+
# PECL always uses the version for the package name.
104+
# Read it from the version file and store in env to use when uploading artifacts
105+
- name: "Read current package version"
106+
run: |
107+
PACKAGE_VERSION=$(./bin/update-release-version.php get-version)
108+
echo "PACKAGE_VERSION=${PACKAGE_VERSION}" >> "$GITHUB_ENV"
109+
echo "PACKAGE_FILE=mongodb-${PACKAGE_VERSION}.tgz" >> "$GITHUB_ENV"
110+
111+
- name: "Install release archive to verify correctness"
112+
run: sudo pecl install ${{ env.PACKAGE_FILE }}

0 commit comments

Comments
 (0)