Skip to content

Commit

Permalink
Merge pull request #8 from Slamdunk/laminas_ci_workflow
Browse files Browse the repository at this point in the history
Adopt Laminas CI workflow
  • Loading branch information
boesing committed Apr 25, 2021
2 parents b45a76a + 22bb036 commit 76fc488
Show file tree
Hide file tree
Showing 14 changed files with 4,050 additions and 254 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/.gitattributes export-ignore
/.github/ export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/.laminas-ci export-ignore
/docs/ export-ignore
/mkdocs.yml export-ignore
/phpcs.xml export-ignore
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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 }}
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 }}
1 change: 0 additions & 1 deletion .gitignore
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/
Expand Down
29 changes: 29 additions & 0 deletions .laminas-ci/composer-root-version.sh
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
7 changes: 7 additions & 0 deletions .laminas-ci/pre-install.sh
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
53 changes: 0 additions & 53 deletions .travis.yml

This file was deleted.

65 changes: 0 additions & 65 deletions CHANGELOG.md

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# laminas-cache-storage-adapter-filesystem

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

This library provides …

Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
},
"require-dev": {
"laminas/laminas-cache": "^2.10",
"laminas/laminas-cache-storage-adapter-test": "^1.0@dev",
"laminas/laminas-cache-storage-adapter-test": "^1.1.1",
"laminas/laminas-coding-standard": "~1.0.0",
"laminas/laminas-serializer": "^2.10",
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^2.7"
},
"config": {
Expand Down
Loading

0 comments on commit 76fc488

Please sign in to comment.