From aa37ccd200f70d1c3abdc242d7f0281fe26fd29f Mon Sep 17 00:00:00 2001 From: James Freeman Date: Fri, 23 Dec 2022 08:06:13 +0000 Subject: [PATCH 1/4] added php 8.2 support --- .../php-8.2-couch-mongo-validate.yml | 11 ++++ .github/workflows/php-8.2-couch-mongo.yml | 20 ++++++++ .github/workflows/php-8.2-publish.yml | 20 ++++++++ .github/workflows/php-8.2-validate.yml | 11 ++++ 8.2-couch-mongo/Dockerfile | 24 +++++++++ 8.2-couch-mongo/goss.yaml | 41 +++++++++++++++ 8.2-couch-mongo/readme.md | 33 ++++++++++++ 8.2/Dockerfile | 51 +++++++++++++++++++ 8.2/goss.yaml | 39 ++++++++++++++ 8.2/readme.md | 31 +++++++++++ readme.md | 9 ++-- 11 files changed, 286 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/php-8.2-couch-mongo-validate.yml create mode 100644 .github/workflows/php-8.2-couch-mongo.yml create mode 100644 .github/workflows/php-8.2-publish.yml create mode 100644 .github/workflows/php-8.2-validate.yml create mode 100644 8.2-couch-mongo/Dockerfile create mode 100644 8.2-couch-mongo/goss.yaml create mode 100644 8.2-couch-mongo/readme.md create mode 100644 8.2/Dockerfile create mode 100644 8.2/goss.yaml create mode 100644 8.2/readme.md diff --git a/.github/workflows/php-8.2-couch-mongo-validate.yml b/.github/workflows/php-8.2-couch-mongo-validate.yml new file mode 100644 index 0000000..ed26997 --- /dev/null +++ b/.github/workflows/php-8.2-couch-mongo-validate.yml @@ -0,0 +1,11 @@ +on: push +name: php-8.2-couch-mongo-validate +jobs: + validate: + runs-on: ubuntu-latest + container: + image: kirschbaumdevelopment/laravel-test-runner:8.2-couch-mongo + + steps: + - uses: actions/checkout@v1 + - run: goss --gossfile 8.2-couch-mongo/goss.yaml validate diff --git a/.github/workflows/php-8.2-couch-mongo.yml b/.github/workflows/php-8.2-couch-mongo.yml new file mode 100644 index 0000000..bd1ff7d --- /dev/null +++ b/.github/workflows/php-8.2-couch-mongo.yml @@ -0,0 +1,20 @@ +name: php-8.1-couch-mongo-publish +on: + push: + branches: + - master +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@master + with: + name: kirschbaumdevelopment/laravel-test-runner + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + workdir: 8.1-couch-mongo + tags: "8.1-couch-mongo" diff --git a/.github/workflows/php-8.2-publish.yml b/.github/workflows/php-8.2-publish.yml new file mode 100644 index 0000000..ed63a92 --- /dev/null +++ b/.github/workflows/php-8.2-publish.yml @@ -0,0 +1,20 @@ +name: php-8.2-publish +on: + push: + branches: + - master +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@master + with: + name: kirschbaumdevelopment/laravel-test-runner + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + workdir: 8.2 + tags: "8.2" diff --git a/.github/workflows/php-8.2-validate.yml b/.github/workflows/php-8.2-validate.yml new file mode 100644 index 0000000..b6854e8 --- /dev/null +++ b/.github/workflows/php-8.2-validate.yml @@ -0,0 +1,11 @@ +on: push +name: php-8.2-validate +jobs: + validate: + runs-on: ubuntu-latest + container: + image: kirschbaumdevelopment/laravel-test-runner:8.2 + + steps: + - uses: actions/checkout@v1 + - run: goss --gossfile 8.2/goss.yaml validate diff --git a/8.2-couch-mongo/Dockerfile b/8.2-couch-mongo/Dockerfile new file mode 100644 index 0000000..43454dc --- /dev/null +++ b/8.2-couch-mongo/Dockerfile @@ -0,0 +1,24 @@ +FROM kirschbaumdevelopment/laravel-test-runner:8.2 + +# Install system dependencies for couchbase +RUN apt-get install -y wget +RUN wget -O - https://packages.couchbase.com/clients/c/repos/deb/couchbase.key | apt-key add - +RUN echo "deb https://packages.couchbase.com/clients/c/repos/deb/ubuntu1804 bionic bionic/main" | tee /etc/apt/sources.list.d/couchbase.list +RUN apt-get update +RUN apt-get install -y libcouchbase3 libcouchbase-dev + +## Install PECL +RUN apt-get install -y php-pear php8.2-dev php8.2-xml +### Making sure we're using the correct php version +RUN rm /etc/alternatives/php +RUN ln -s /usr/bin/php8.2 /etc/alternatives/php + + +## MongoDB +RUN pecl install mongodb-1.13.0 +RUN echo "extension=mongodb.so" | tee -a /etc/php/8.1/cli/conf.d/20-mongodb.ini + + +## Couchbase +RUN pecl install couchbase-3.2.0 +RUN echo "extension=couchbase.so" | tee -a /etc/php/8.1/cli/conf.d/30-couchbase.ini diff --git a/8.2-couch-mongo/goss.yaml b/8.2-couch-mongo/goss.yaml new file mode 100644 index 0000000..71f3bff --- /dev/null +++ b/8.2-couch-mongo/goss.yaml @@ -0,0 +1,41 @@ +command: + node --version: + exit-status: 0 + stdout: + - "v14" + yarn --version: + exit-status: 0 + npm --version: + exit-status: 0 + stdout: + - "6" + git --version: + exit-status: 0 + composer --version: + exit-status: 0 + php --version: + exit-status: 0 + stdout: + - 8.1 + php -m: + exit-status: 0 + stdout: + - bcmath + - calendar + - exif + - gd + - iconv + - imap + - intl + - ldap + - mbstring + - mysqli + - pcntl + - pdo_mysql + - pdo_pgsql + - pgsql + - soap + - xml + - zip + - mongodb + - couchbase diff --git a/8.2-couch-mongo/readme.md b/8.2-couch-mongo/readme.md new file mode 100644 index 0000000..2ee4c32 --- /dev/null +++ b/8.2-couch-mongo/readme.md @@ -0,0 +1,33 @@ +# Canvas Test Runner + +Docker Container with PHP and extensions to be compatible with most Laravel applications. Also installed on this container we have Composer and NodeJS/NPM/Yarn. + +## Building and pushing the image + +**Build**: + +``` +docker build --pull -t kirschbaumdevelopment/laravel-test-runner . +``` + +**Tag**: + +``` +docker tag kirschbaumdevelopment/laravel-test-runner:latest kirschbaumdevelopment/laravel-test-runner:8.1-couch-mongo +``` + +**Login** +``` +docker login --username=yourhubusername --email=youremail@provider.com +``` + + +**Push**: + +``` +docker push kirschbaumdevelopment/laravel-test-runner:8.1-couch-mongo +``` + +## Credits + +- [Luis Dalmolin](https://github.com/luisdalmolin) diff --git a/8.2/Dockerfile b/8.2/Dockerfile new file mode 100644 index 0000000..b1cfd59 --- /dev/null +++ b/8.2/Dockerfile @@ -0,0 +1,51 @@ +FROM ubuntu:20.04 +LABEL maintainer="Luis Dalmolin " +ARG DEBIAN_FRONTEND=noninteractive + +ENV GOSS_VERSION="0.3.6" + +RUN apt-get update && apt-get install -y software-properties-common curl +RUN add-apt-repository ppa:ondrej/php -y +RUN add-apt-repository ppa:git-core/ppa -y +RUN apt-get update -y +RUN apt-get install -y \ + unzip \ + php8.2-cli \ + php8.2-gd \ + php8.2-ldap \ + php8.2-mbstring \ + php8.2-mysql \ + php8.2-pgsql \ + php8.2-sqlite3 \ + php8.2-xml \ + php8.2-xsl \ + php8.2-zip \ + php8.2-curl \ + php8.2-soap \ + php8.2-gmp \ + php8.2-bcmath \ + php8.2-intl \ + php8.2-imap \ + php8.2-phpdbg \ + php8.2-bz2 \ + php8.2-redis + +# composer +ENV COMPOSER_HOME=/composer +ENV PATH=./vendor/bin:/composer/vendor/bin:/root/.yarn/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV COMPOSER_ALLOW_SUPERUSER=1 +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + +# mysql client +RUN apt-get install -y mysql-client + +# git +RUN apt-get install -y git + +# node and yarn +RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - +RUN apt-get install -y nodejs +RUN npm install -g yarn + +# goss +RUN curl -fsSL https://goss.rocks/install | GOSS_VER=v${GOSS_VERSION} sh diff --git a/8.2/goss.yaml b/8.2/goss.yaml new file mode 100644 index 0000000..e6e7404 --- /dev/null +++ b/8.2/goss.yaml @@ -0,0 +1,39 @@ +command: + node --version: + exit-status: 0 + stdout: + - "v14" + yarn --version: + exit-status: 0 + npm --version: + exit-status: 0 + stdout: + - "6" + git --version: + exit-status: 0 + composer --version: + exit-status: 0 + php --version: + exit-status: 0 + stdout: + - 8.1 + php -m: + exit-status: 0 + stdout: + - bcmath + - calendar + - exif + - gd + - iconv + - imap + - intl + - ldap + - mbstring + - mysqli + - pcntl + - pdo_mysql + - pdo_pgsql + - pgsql + - soap + - xml + - zip diff --git a/8.2/readme.md b/8.2/readme.md new file mode 100644 index 0000000..74eb791 --- /dev/null +++ b/8.2/readme.md @@ -0,0 +1,31 @@ +# Laravel Test Runner - PHP 8.2 + +Docker Container with PHP 8.2 and extensions to be compatible with most Laravel applications. Also installed on this container we have Composer and NodeJS/NPM/Yarn. + +## Building and pushing the image + +**Build**: + +``` +docker build --pull -t kirschbaumdevelopment/laravel-test-runner . +``` + +**Tag**: + +``` +docker tag kirschbaumdevelopment/laravel-test-runner:latest kirschbaumdevelopment/laravel-test-runner:8.2 +``` + +**Push**: + +``` +docker push kirschbaumdevelopment/laravel-test-runner:8.2 +``` + +## Credits + +- [Pushpak Chhajed](https://github.com/pushpak1300) + +## Sponsorship + +Development of this package is sponsored by Kirschbaum Development Group, a developer driven company focused on problem solving, team building, and community. Learn more [about us](https://kirschbaumdevelopment.com) or [join us](https://careers.kirschbaumdevelopment.com)! diff --git a/readme.md b/readme.md index d61cdce..3d8095b 100644 --- a/readme.md +++ b/readme.md @@ -7,8 +7,9 @@ This is a [docker container](https://cloud.docker.com/u/kirschbaumdevelopment/repository/docker/kirschbaumdevelopment/laravel-test-runner) for running Laravel tests in Github actions. -| PHP version | Link | Status | Container Tag | -| ----------- | ---- | ------ | ------------- | +| PHP version | Link | Status | Container Tag | +| ---------- |-----------------------------------------------------------------------------------------------| ------ | ------------- | +| 8.2 | [🔗](https://github.com/kirschbaum-development/laravel-test-runner-container/blob/master/8.2) | [![Actions Status](https://github.com/kirschbaum-development/laravel-test-runner-container/workflows/php-8.1-validate/badge.svg)](https://github.com/kirschbaum-development/laravel-test-runner-container/actions) | kirschbaumdevelopment/laravel-test-runner:8.2 | | 8.1 | [🔗](https://github.com/kirschbaum-development/laravel-test-runner-container/blob/master/8.1) | [![Actions Status](https://github.com/kirschbaum-development/laravel-test-runner-container/workflows/php-8.1-validate/badge.svg)](https://github.com/kirschbaum-development/laravel-test-runner-container/actions) | kirschbaumdevelopment/laravel-test-runner:8.1 | | 8.0 | [🔗](https://github.com/kirschbaum-development/laravel-test-runner-container/blob/master/8.0) | [![Actions Status](https://github.com/kirschbaum-development/laravel-test-runner-container/workflows/php-8.0-validate/badge.svg)](https://github.com/kirschbaum-development/laravel-test-runner-container/actions) | kirschbaumdevelopment/laravel-test-runner:8.0 | | 7.4 | [🔗](https://github.com/kirschbaum-development/laravel-test-runner-container/blob/master/7.4) | [![Actions Status](https://github.com/kirschbaum-development/laravel-test-runner-container/workflows/php-7.4-validate/badge.svg)](https://github.com/kirschbaum-development/laravel-test-runner-container/actions) | kirschbaumdevelopment/laravel-test-runner:7.4 | @@ -23,14 +24,14 @@ You may want to check [this blog post](https://kirschbaumdevelopment.com/news-ar In case you need any custom extensions, the container is running Ubuntu, so you can simply install them: ```bash -apt-get install -y php8.1-bz2 +apt-get install -y php8.2-bz2 ``` Example on Github actions: ```yaml - name: Install additional PHP extensions - run: apt-get install -y php8.1-bz2 php8.1-soap + run: apt-get install -y php8.2-bz2 php8.2-soap ``` ## Issues From b52bb77ac8815414287a31e685be63b12f29f1bb Mon Sep 17 00:00:00 2001 From: James Freeman Date: Fri, 23 Dec 2022 08:07:04 +0000 Subject: [PATCH 2/4] fix php-couch-mongo --- .github/workflows/php-8.2-couch-mongo.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/php-8.2-couch-mongo.yml b/.github/workflows/php-8.2-couch-mongo.yml index bd1ff7d..b603ae9 100644 --- a/.github/workflows/php-8.2-couch-mongo.yml +++ b/.github/workflows/php-8.2-couch-mongo.yml @@ -1,4 +1,4 @@ -name: php-8.1-couch-mongo-publish +name: php-8.2-couch-mongo-publish on: push: branches: @@ -16,5 +16,5 @@ jobs: name: kirschbaumdevelopment/laravel-test-runner username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - workdir: 8.1-couch-mongo - tags: "8.1-couch-mongo" + workdir: 8.2-couch-mongo + tags: "8.2-couch-mongo" From c06393ee9874f130d5d88137172c83a4283022bf Mon Sep 17 00:00:00 2001 From: James Freeman Date: Fri, 23 Dec 2022 08:07:48 +0000 Subject: [PATCH 3/4] fix php-couch-mongo --- 8.2-couch-mongo/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/8.2-couch-mongo/Dockerfile b/8.2-couch-mongo/Dockerfile index 43454dc..fcef4c2 100644 --- a/8.2-couch-mongo/Dockerfile +++ b/8.2-couch-mongo/Dockerfile @@ -16,9 +16,9 @@ RUN ln -s /usr/bin/php8.2 /etc/alternatives/php ## MongoDB RUN pecl install mongodb-1.13.0 -RUN echo "extension=mongodb.so" | tee -a /etc/php/8.1/cli/conf.d/20-mongodb.ini +RUN echo "extension=mongodb.so" | tee -a /etc/php/8.2/cli/conf.d/20-mongodb.ini ## Couchbase RUN pecl install couchbase-3.2.0 -RUN echo "extension=couchbase.so" | tee -a /etc/php/8.1/cli/conf.d/30-couchbase.ini +RUN echo "extension=couchbase.so" | tee -a /etc/php/8.2/cli/conf.d/30-couchbase.ini From 59471f4f1f1222a5702c46231ea786c9e62c5eff Mon Sep 17 00:00:00 2001 From: James Freeman Date: Fri, 23 Dec 2022 08:09:39 +0000 Subject: [PATCH 4/4] fix non-changed areas --- 8.2-couch-mongo/goss.yaml | 2 +- 8.2-couch-mongo/readme.md | 4 ++-- 8.2/goss.yaml | 2 +- readme.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/8.2-couch-mongo/goss.yaml b/8.2-couch-mongo/goss.yaml index 71f3bff..eec1c15 100644 --- a/8.2-couch-mongo/goss.yaml +++ b/8.2-couch-mongo/goss.yaml @@ -16,7 +16,7 @@ command: php --version: exit-status: 0 stdout: - - 8.1 + - 8.2 php -m: exit-status: 0 stdout: diff --git a/8.2-couch-mongo/readme.md b/8.2-couch-mongo/readme.md index 2ee4c32..3bc978a 100644 --- a/8.2-couch-mongo/readme.md +++ b/8.2-couch-mongo/readme.md @@ -13,7 +13,7 @@ docker build --pull -t kirschbaumdevelopment/laravel-test-runner . **Tag**: ``` -docker tag kirschbaumdevelopment/laravel-test-runner:latest kirschbaumdevelopment/laravel-test-runner:8.1-couch-mongo +docker tag kirschbaumdevelopment/laravel-test-runner:latest kirschbaumdevelopment/laravel-test-runner:8.2-couch-mongo ``` **Login** @@ -25,7 +25,7 @@ docker login --username=yourhubusername --email=youremail@provider.com **Push**: ``` -docker push kirschbaumdevelopment/laravel-test-runner:8.1-couch-mongo +docker push kirschbaumdevelopment/laravel-test-runner:8.2-couch-mongo ``` ## Credits diff --git a/8.2/goss.yaml b/8.2/goss.yaml index e6e7404..760bef0 100644 --- a/8.2/goss.yaml +++ b/8.2/goss.yaml @@ -16,7 +16,7 @@ command: php --version: exit-status: 0 stdout: - - 8.1 + - 8.2 php -m: exit-status: 0 stdout: diff --git a/readme.md b/readme.md index 3d8095b..3f2fc87 100644 --- a/readme.md +++ b/readme.md @@ -9,7 +9,7 @@ This is a [docker container](https://cloud.docker.com/u/kirschbaumdevelopment/re | PHP version | Link | Status | Container Tag | | ---------- |-----------------------------------------------------------------------------------------------| ------ | ------------- | -| 8.2 | [🔗](https://github.com/kirschbaum-development/laravel-test-runner-container/blob/master/8.2) | [![Actions Status](https://github.com/kirschbaum-development/laravel-test-runner-container/workflows/php-8.1-validate/badge.svg)](https://github.com/kirschbaum-development/laravel-test-runner-container/actions) | kirschbaumdevelopment/laravel-test-runner:8.2 | +| 8.2 | [🔗](https://github.com/kirschbaum-development/laravel-test-runner-container/blob/master/8.2) | [![Actions Status](https://github.com/kirschbaum-development/laravel-test-runner-container/workflows/php-8.2-validate/badge.svg)](https://github.com/kirschbaum-development/laravel-test-runner-container/actions) | kirschbaumdevelopment/laravel-test-runner:8.2 | | 8.1 | [🔗](https://github.com/kirschbaum-development/laravel-test-runner-container/blob/master/8.1) | [![Actions Status](https://github.com/kirschbaum-development/laravel-test-runner-container/workflows/php-8.1-validate/badge.svg)](https://github.com/kirschbaum-development/laravel-test-runner-container/actions) | kirschbaumdevelopment/laravel-test-runner:8.1 | | 8.0 | [🔗](https://github.com/kirschbaum-development/laravel-test-runner-container/blob/master/8.0) | [![Actions Status](https://github.com/kirschbaum-development/laravel-test-runner-container/workflows/php-8.0-validate/badge.svg)](https://github.com/kirschbaum-development/laravel-test-runner-container/actions) | kirschbaumdevelopment/laravel-test-runner:8.0 | | 7.4 | [🔗](https://github.com/kirschbaum-development/laravel-test-runner-container/blob/master/7.4) | [![Actions Status](https://github.com/kirschbaum-development/laravel-test-runner-container/workflows/php-7.4-validate/badge.svg)](https://github.com/kirschbaum-development/laravel-test-runner-container/actions) | kirschbaumdevelopment/laravel-test-runner:7.4 |