Git Product home page Git Product logo

docker-compose-ci's Introduction

docker-compose-ci

"Docker Compose" based CI and testing for MediaWiki extensions, built from mediawiki-ci images.

Usage

This repository is to be integrated into other repositories as a Git submodule. It uses "Make" as main entry point and command line interface. The Makefile contained in this repository must be called up from a Makefile in the other repository.

Init submodule

git submodule init
git submodule update

Update submodule

git submodule update --init --remote

Run tests locally

Ensure, you have Make and Docker installed.

make ci

Run all tests with more detailed output and coverage:

make ci-coverage

After the tests have been executed, the containers continue to run in order to carry out analyses in the containers if necessary:

docker ps

CONTAINER ID   IMAGE                                   COMMAND                  CREATED          STATUS          PORTS     NAMES
8c8606f87631   semanticresultformats:test-1.35-4.1.3   "docker-php-entrypoi…"   25 minutes ago   Up 25 minutes   80/tcp    semanticresultformats-sqlite-wiki-1

Stop the containers:

make down

Currently supported required extensions

Extensions usually required by other extensions are already included and can be used with versions specified by variables.

Table 1. Supported required extensions
Extension Variable

AdminLinks

AL_VERSION

Chameleon

CHAMELEON_VERSION

DisplayTitle

DT_VERSION

Maps

MAPS_VERSION

Mermaid

MM_VERSION

PageForms

PF_VERSION, PF_REPO (alternate repo URL)

PageSchemas

PS_VERSION

SemanticMediaWiki

SMW_VERSION

SemanticResultFormats

SRF_VERSION

Other variables

Variable Description

MW_VERSION

Docker image MediaWiki Version

PHP_VERSION

Docker image PHP Version

DB_TYPE

Database type (mysql, postgres, sqlite)

DB_IMAGE

Database Docker image (mysql and postgres only), for example mysql:5

EXTENSION

The name of the extension being tested/CI’ed

COMPOSER_EXT

true or false. Enables "composer update" inside of extension.

NODE_JS

true or false. Enables node.js related tests and "npm install"

Example Makefile

This is an example Makefile (taken from SemanticResultFormats):

-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=SemanticResultFormats

# docker images
MW_VERSION?=1.35
PHP_VERSION?=7.4
DB_TYPE?=sqlite
DB_IMAGE?=""

# extensions
SMW_VERSION?=4.1.3
PF_VERSION ?= 5.5.1
SFS_VERSION ?= 4.0.0-beta
MM_VERSION ?= 3.1.0

# 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

docker-compose-ci's People

Contributors

gesinn-it-evl avatar gesinn-it-gea avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.