Skip to content

Commit

Permalink
Merge pull request #44 from ghostwriter/feature/add-ci
Browse files Browse the repository at this point in the history
Add GitHub CI
  • Loading branch information
weierophinney committed Jun 30, 2021
2 parents 27458b0 + 5db4739 commit f519167
Show file tree
Hide file tree
Showing 82 changed files with 6,095 additions and 1,635 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.json export-ignore
/docs/ export-ignore
/mkdocs.yml export-ignore
/phpcs.xml export-ignore
Expand Down
85 changes: 85 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
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:4.4
options: >-
--health-cmd="mongo --quiet --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)'"
--health-interval=10s
--health-timeout=5s
--health-retries=3
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: github
MYSQL_ROOT_HOST: '%'
MYSQL_USER: github
MYSQL_PASSWORD: github
MYSQL_DATABASE: laminas_session_test
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
postgres:
image: postgres:13.3-alpine
env:
POSTGRES_USER: github
POSTGRES_PASSWORD: github
POSTGRES_DB: laminas_session_test
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready"
--health-interval=10s
--health-timeout=5s
--health-retries=3
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_SESSION_ADAPTER_DRIVER_MYSQL: true
TESTS_LAMINAS_SESSION_ADAPTER_DRIVER_MYSQL_HOSTNAME: mysql
TESTS_LAMINAS_SESSION_ADAPTER_DRIVER_MYSQL_USERNAME: github
TESTS_LAMINAS_SESSION_ADAPTER_DRIVER_MYSQL_PASSWORD: github
TESTS_LAMINAS_SESSION_ADAPTER_DRIVER_MYSQL_DATABASE: laminas_session_test
TESTS_LAMINAS_SESSION_ADAPTER_DRIVER_PGSQL: true
TESTS_LAMINAS_SESSION_ADAPTER_DRIVER_PGSQL_HOSTNAME: postgres
TESTS_LAMINAS_SESSION_ADAPTER_DRIVER_PGSQL_USERNAME: github
TESTS_LAMINAS_SESSION_ADAPTER_DRIVER_PGSQL_PASSWORD: github
TESTS_LAMINAS_SESSION_ADAPTER_DRIVER_PGSQL_DATABASE: laminas_session_test
TESTS_LAMINAS_SESSION_ADAPTER_DRIVER_MONGODB: true
TESTS_LAMINAS_SESSION_ADAPTER_DRIVER_MONGODB_CONNECTION_STRING: mongodb://mongo/
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/.phpcs-cache
/.phpunit.result.cache
/clover.xml
/composer.lock
/coveralls-upload.json
/docs/html/
/laminas-mkdoc-theme.tgz
/laminas-mkdoc-theme/
/phpunit.xml
/vendor/
.phpunit.result.cache
7 changes: 7 additions & 0 deletions .laminas-ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extensions": [
"mongodb",
"mysql",
"pgsql"
]
}
71 changes: 0 additions & 71 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit f519167

Please sign in to comment.