-
-
Notifications
You must be signed in to change notification settings - Fork 8
Adds PHP 8 support and Laminas CI workflow #6
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
Changes from 7 commits
866656d
0d3df63
682e041
8aba30e
fd84804
4a5aa31
a0d9ff4
ea47ba2
56e260e
e93011b
c77a16e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: "Continuous Integration" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- '[0-9]+.[0-9]+.x' | ||
- 'refs/pull/*' | ||
tags: | ||
|
||
jobs: | ||
matrix: | ||
name: Generate job matrix | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.matrix.outputs.matrix }} | ||
steps: | ||
- name: Gather CI configuration | ||
id: matrix | ||
uses: laminas/laminas-ci-matrix-action@v1 | ||
|
||
qa: | ||
name: QA Checks | ||
needs: [matrix] | ||
runs-on: ${{ matrix.operatingSystem }} | ||
services: | ||
mongo: | ||
image: mongo | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }} | ||
steps: | ||
- name: ${{ matrix.name }} | ||
uses: laminas/laminas-continuous-integration-action@v1 | ||
with: | ||
job: ${{ matrix.job }} | ||
env: | ||
TESTS_LAMINAS_CACHE_EXTMONGODB_CONNECTSTRING: mongodb://mongo/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
/.phpunit.result.cache | ||
/composer.lock | ||
/docs/html/ | ||
/laminas-mkdoc-theme.tgz | ||
/laminas-mkdoc-theme/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extensions": ["mongodb"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash -l | ||
|
||
if [[ -z "${GITHUB_BASE_REF}" ]]; then | ||
echo "Environment variable \"GITHUB_BASE_REF\" does not exist." | ||
|
||
exit 0 | ||
fi | ||
|
||
BRANCH_REGEX="[0-9]+\.[0-9]+\.x" | ||
|
||
if ! [[ "${GITHUB_BASE_REF}" =~ ${BRANCH_REGEX} ]]; then | ||
echo "Environment variable \"GITHUB_BASE_REF\" does not match expectations." | ||
echo "Must match ${BRANCH_REGEX}"; | ||
|
||
exit 0 | ||
fi | ||
|
||
COMPOSER_ROOT_VERSION=$(echo ${GITHUB_BASE_REF} | sed 's/\.x/\.99/g') | ||
|
||
echo "Determined composer root version as \"${COMPOSER_ROOT_VERSION}\"." | ||
|
||
if [[ true = "${GITHUB_ACTIONS}" ]]; then | ||
echo "Setting COMPOSER_ROOT_VERSION environment variable to \"${COMPOSER_ROOT_VERSION}\"." | ||
if [ ! -w "${GITHUB_ENV}" ]; then | ||
echo "Missing GITHUB_ENV environment variable. Cannot store COMPOSER_ROOT_VERSION to be available within the current check." | ||
exit 1 | ||
fi | ||
echo "COMPOSER_ROOT_VERSION=${COMPOSER_ROOT_VERSION}" >> "${GITHUB_ENV}" | ||
fi |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
WORKING_DIRECTORY=$2 | ||
JOB=$3 | ||
PHP_VERSION=$(echo "${JOB}" | jq -r '.php') | ||
|
||
${WORKING_DIRECTORY}/.laminas-ci/composer-root-version.sh || exit 1 |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
], | ||
"license": "BSD-3-Clause", | ||
"require": { | ||
"php": "^5.6 || ^7.0" | ||
"php": "^7.3 || ~8.0.0" | ||
}, | ||
"conflict": { | ||
"laminas/laminas-cache": "<2.10" | ||
|
@@ -16,13 +16,15 @@ | |
"laminas/laminas-cache-storage-implementation": "1.0" | ||
}, | ||
"require-dev": { | ||
"laminas/laminas-cache": "^2.10", | ||
"laminas/laminas-cache-storage-adapter-test": "^1.0@dev", | ||
"mongodb/mongodb": "^1.8.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was surprised this requirement wasn't there before: without it no test passes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was required by the travis configuration as there were different versions used for different php versions. |
||
"laminas/laminas-cache": "^2.10.3", | ||
"laminas/laminas-cache-storage-adapter-test": "^1.1.1", | ||
"laminas/laminas-coding-standard": "~1.0.0", | ||
"laminas/laminas-serializer": "^2.10.1", | ||
"squizlabs/php_codesniffer": "^2.7" | ||
}, | ||
"suggest": { | ||
"ext-mongodb": "MongoDB, to use the ExtMongoDb storage adapter" | ||
"mongodb/mongodb": "MongoDB, to use the ExtMongoDb storage adapter" | ||
}, | ||
"config": { | ||
"sort-packages": true | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea what health check to use for MongoDB.