Skip to content

Commit 3e78f4e

Browse files
committed
Adopt Laminas CI workflow
Signed-off-by: Filippo Tessarotto <[email protected]>
1 parent c6ff944 commit 3e78f4e

File tree

12 files changed

+3509
-141
lines changed

12 files changed

+3509
-141
lines changed

.ci/mongodb.ini

Lines changed: 0 additions & 1 deletion
This file was deleted.

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
/.gitattributes export-ignore
33
/.github/ export-ignore
44
/.gitignore export-ignore
5-
/.travis.yml export-ignore
5+
/.laminas-ci/ export-ignore
6+
/.laminas-ci.json export-ignore
67
/docs/ export-ignore
78
/mkdocs.yml export-ignore
89
/phpcs.xml export-ignore
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "Continuous Integration"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- '[0-9]+.[0-9]+.x'
8+
- 'refs/pull/*'
9+
tags:
10+
11+
jobs:
12+
matrix:
13+
name: Generate job matrix
14+
runs-on: ubuntu-latest
15+
outputs:
16+
matrix: ${{ steps.matrix.outputs.matrix }}
17+
steps:
18+
- name: Gather CI configuration
19+
id: matrix
20+
uses: laminas/laminas-ci-matrix-action@v1
21+
22+
qa:
23+
name: QA Checks
24+
needs: [matrix]
25+
runs-on: ${{ matrix.operatingSystem }}
26+
strategy:
27+
fail-fast: false
28+
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }}
29+
steps:
30+
- name: ${{ matrix.name }}
31+
uses: laminas/laminas-continuous-integration-action@v1
32+
with:
33+
job: ${{ matrix.job }}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/.phpunit.result.cache
2-
/composer.lock
32
/docs/html/
43
/laminas-mkdoc-theme.tgz
54
/laminas-mkdoc-theme/

.laminas-ci.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extensions": ["mongodb"]
3+
}

.laminas-ci/composer-root-version.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash -l
2+
3+
if [[ -z "${GITHUB_BASE_REF}" ]]; then
4+
echo "Environment variable \"GITHUB_BASE_REF\" does not exist."
5+
6+
exit 0
7+
fi
8+
9+
BRANCH_REGEX="[0-9]+\.[0-9]+\.x"
10+
11+
if ! [[ "${GITHUB_BASE_REF}" =~ ${BRANCH_REGEX} ]]; then
12+
echo "Environment variable \"GITHUB_BASE_REF\" does not match expectations."
13+
echo "Must match ${BRANCH_REGEX}";
14+
15+
exit 0
16+
fi
17+
18+
COMPOSER_ROOT_VERSION=$(echo ${GITHUB_BASE_REF} | sed 's/\.x/\.99/g')
19+
20+
echo "Determined composer root version as \"${COMPOSER_ROOT_VERSION}\"."
21+
22+
if [[ true = "${GITHUB_ACTIONS}" ]]; then
23+
echo "Setting COMPOSER_ROOT_VERSION environment variable to \"${COMPOSER_ROOT_VERSION}\"."
24+
if [ ! -w "${GITHUB_ENV}" ]; then
25+
echo "Missing GITHUB_ENV environment variable. Cannot store COMPOSER_ROOT_VERSION to be available within the current check."
26+
exit 1
27+
fi
28+
echo "COMPOSER_ROOT_VERSION=${COMPOSER_ROOT_VERSION}" >> "${GITHUB_ENV}"
29+
fi

.laminas-ci/pre-install.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
WORKING_DIRECTORY=$2
4+
JOB=$3
5+
PHP_VERSION=$(echo "${JOB}" | jq -r '.php')
6+
7+
${WORKING_DIRECTORY}/.laminas-ci/composer-root-version.sh || exit 1

.travis.yml

Lines changed: 0 additions & 87 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 0 additions & 46 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# laminas-cache-storage-adapter-ext-mongodb
22

3-
[![Build Status](https://travis-ci.com/laminas/laminas-cache-storage-adapter-ext-mongodb.svg?branch=master)](https://travis-ci.com/laminas/laminas-cache-storage-adapter-ext-mongodb)
4-
[![Coverage Status](https://coveralls.io/repos/github/laminas/laminas-cache-storage-adapter-ext-mongodb/badge.svg?branch=master)](https://coveralls.io/github/laminas/laminas-cache-storage-adapter-ext-mongodb?branch=master)
3+
[![Build Status](https://github.com/laminas/laminas-cache-storage-adapter-ext-mongodb/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/laminas/laminas-cache-storage-adapter-ext-mongodb/actions/workflows/continuous-integration.yml)
54

65
This library provides …
76

0 commit comments

Comments
 (0)