Skip to content

Add test job to build and install PECL package #1559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,41 @@ jobs:
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 }}
Loading