diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a83ee00 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,53 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +jobs: + + test: + + runs-on: ubuntu-22.04 + continue-on-error: ${{ matrix.experimental }} + + strategy: + matrix: + include: + - mediawiki_version: '1.35' + php_version: 7.4 + coverage: false + experimental: true + - mediawiki_version: '1.39' + php_version: 8.1 + coverage: false + experimental: true + - mediawiki_version: '1.40' + php_version: 8.1 + coverage: false + experimental: true + + env: + MW_VERSION: ${{ matrix.mediawiki_version }} + SMW_VERSION: ${{ matrix.smw_version }} + PHP_VERSION: ${{ matrix.php_version }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Update submodules + run: git submodule update --init --remote + + - name: Run tests + run: make ci + if: matrix.coverage == false + + - name: Run tests with coverage + run: make ci-coverage + if: matrix.coverage == true diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..8ada071 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "build"] + path = build + url = git@github.com:gesinn-it-pub/docker-compose-ci.git diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0ec32da --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +-include .env +export + +# setup for docker-compose-ci build directory +# delete "build" directory to update docker-compose-ci + +ifeq (,$(wildcard ./build/)) + $(shell git submodule update --init --remote) +endif + +EXTENSION := EmailLogger + +# docker images +MW_VERSION?=1.35 +PHP_VERSION?=7.4 +DB_TYPE?=sqlite +DB_IMAGE?="" + +# extensions + +# composer +# Enables "composer update" inside of extension +# COMPOSER_EXT?=true + +# nodejs +# Enables node.js related tests and "npm install" +# NODE_JS?=true + +# check for build dir and git submodule init if it does not exist +include build/Makefile diff --git a/build b/build new file mode 160000 index 0000000..b3f37c9 --- /dev/null +++ b/build @@ -0,0 +1 @@ +Subproject commit b3f37c9909e2dc6d2f97ce00efb9b812162cffb3