Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
9b37085
Move tests
Dec 14, 2021
8f50fdd
Adjust linting
Dec 14, 2021
a89b8f2
Adjust tests
Dec 14, 2021
48c51fb
Adjust php test
Dec 14, 2021
5733570
More php testing adjustments
Dec 14, 2021
5f8fc5f
More php testing adjustments again
Dec 14, 2021
28cddac
Move to 5.3 tests
Dec 14, 2021
ab03141
Add in the rest of the php 5 tests
Dec 14, 2021
3fdf100
Add in start of 7x tests
Dec 14, 2021
c137d42
Add in the rest of the php tests
Dec 14, 2021
c7c39be
Adjust php 7 tests
Dec 14, 2021
b4e9ea9
Add in php 8 tests
Dec 14, 2021
ab6fb2c
Add in custom image tests
Dec 14, 2021
dfa9985
Add in composer tests
Dec 14, 2021
3a6c740
Adjust tests
Dec 14, 2021
34edbc3
Add in composer deps test
Dec 14, 2021
cd97618
Add in composer deps test lock
Dec 14, 2021
3bc53bc
Add node back into tests
Dec 14, 2021
5eefb34
Adjust node testing
Dec 14, 2021
7aa3b3a
Add a few more custom php tests
Dec 14, 2021
77e3451
Add in xdebug tests
Dec 14, 2021
5787136
PHP 5 local docker builds
Dec 14, 2021
fb31834
Tweak php 5 shell
Dec 14, 2021
040daff
Only use local docker build on current images
Dec 14, 2021
4a1e23b
Test building of edge images
Dec 14, 2021
3eb117d
Add in testing of images after build
Dec 15, 2021
b0e0e19
Add in usage docs
Dec 15, 2021
6a2bfd1
Add in usage docs #2
Dec 15, 2021
f1b86b6
Update README
Dec 15, 2021
6e0b146
Adjust nginx tests
Dec 15, 2021
8512e14
Adjust build test
Dec 15, 2021
4de48f2
Adjust build test - hardcode matrix values
Dec 15, 2021
7586f4f
Add back in php building of images
Dec 15, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 127 additions & 0 deletions .github/workflows/build-php-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: Build PHP Images

on:
# Uncomment below for testing purposes
pull_request:
push:
branches:
- main

jobs:
buildx:
runs-on: ubuntu-20.04
env:
TERM: xterm
strategy:
matrix:
include:
- image: php
tag: 8.1-fpm-4
context: images/8.1-fpm
- image: php
tag: 8.1-apache-4
context: images/8.1-apache
- image: php
tag: 8.0-fpm-4
context: images/8.0-fpm
- image: php
tag: 8.0-apache-4
context: images/8.0-apache
- image: php
tag: 7.4-fpm-4
context: images/7.4-fpm
- image: php
tag: 7.4-apache-4
context: images/7.4-apache
- image: php
tag: 7.3-fpm-4
context: images/7.3-fpm
- image: php
tag: 7.3-apache-4
context: images/7.3-apache

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
install: true
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
# Sets our edge tag if on PR.
- name: Set tag suffix
id: pr
if: ${{ github.event_name == 'pull_request' }}
run: echo "::set-output name=TAG_SUFFIX::-edge"
# Build our images.
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push devwithlando/${{ matrix.image }}:${{ matrix.tag }}${{ steps.pr.outputs.TAG_SUFFIX }}
uses: docker/build-push-action@v2
with:
context: ${{ matrix.context }}
platforms: linux/amd64,linux/arm64
push: true
tags: devwithlando/${{ matrix.image }}:${{ matrix.tag }}${{ steps.pr.outputs.TAG_SUFFIX }}

# Handle Lando Install to test the images after build
# We are hardcoding the dtaa normally included in the matrix
# due to how this testing is setup
- name: Install node 14
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Get Yarn cache directory
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Use Yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ubuntu-20.04-yarn-14-${{ hashFiles('**/yarn.lock') }}
- name: Install Yarn dependencies
run: yarn install --prefer-offline --frozen-lockfile
- name: Grab latest edge Lando CLI
run: |
sudo curl -fsSL -o /usr/local/bin/lando "https://files.lando.dev/cli/lando-linux-x64-edge"
sudo chmod +x /usr/local/bin/lando
- name: Move in lando config appropriate for testing
run: |
mkdir -p ~/.lando/cache
cp -f actions-lando-config.yml ~/.lando/config.yml
echo false > ~/.lando/cache/report_errors
lando --clear
- name: Verify Lando works and we are dogfooding this plugin for tests
run: |
lando version
lando config --path plugins | grep php | grep /home/runner/work/php/php || echo "::error:: Not dogfooding this plugin correctly! "
# This block should eventually become use lando/actions-leia@v2
# @NOTE? Do we want a way for our leia-action to configure apparmor since
# this might break a whole bunch of tests? or is this literally just a thing
# for the Lagoon mysql/mariadb container?
- name: Configure apparmor
run: |
set -x
sudo apt-get remove mysql-server --purge
sudo apt-get install apparmor-profiles
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld

# Test newly built images.
- name: Test Edge Images on PR
if: ${{ github.event_name == 'pull_request' }}
shell: bash
run: |
yarn leia "./examples/images-edge/${{ matrix.tag }}/README.md" -c 'Destroy tests' --stdin --shell bash
- name: Test Stable Images on Push
if: ${{ github.event_name == 'push' }}
shell: bash
run: |
yarn leia "./examples/images-stable/${{ matrix.tag }}/README.md" -c 'Destroy tests' --stdin --shell bash
79 changes: 79 additions & 0 deletions .github/workflows/pr-legacy-php5-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Legacy PHP 5 Tests

on:
pull_request:

jobs:
leia-tests:
runs-on: ${{ matrix.os }}
env:
TERM: xterm
strategy:
matrix:
leia-tests:
- examples/5.3
- examples/5.4
- examples/5.5
- examples/5.6
lando-versions:
- edge
os:
- ubuntu-20.04
node-version:
- '14'
steps:
# Install deps and cache
# Eventually it would be great if these steps could live in a separate YAML file
# that could be included in line to avoid code duplication
- name: Checkout code
uses: actions/checkout@v2
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Get Yarn cache directory
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Use Yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
- name: Install Yarn dependencies
run: yarn install --prefer-offline --frozen-lockfile

# This block should eventually become use lando/actions-hyperdrive@v2
- name: Verify Docker dependencies
run: |
docker --version | grep "20.10."
docker-compose --version | grep "1.29."
- name: Grab latest edge Lando CLI
run: |
sudo curl -fsSL -o /usr/local/bin/lando "https://files.lando.dev/cli/lando-linux-x64-${{ matrix.lando-versions }}"
sudo chmod +x /usr/local/bin/lando
- name: Move in lando config appropriate for testing
run: |
mkdir -p ~/.lando/cache
cp -f actions-lando-config.yml ~/.lando/config.yml
echo false > ~/.lando/cache/report_errors
lando --clear
- name: Verify Lando works and we are dogfooding this plugin for tests
run: |
lando version
lando config --path plugins | grep php | grep /home/runner/work/php/php || echo "::error:: Not dogfooding this plugin correctly! "

# This block should eventually become use lando/actions-leia@v2
# @NOTE? Do we want a way for our leia-action to configure apparmor since
# this might break a whole bunch of tests? or is this literally just a thing
# for the Lagoon mysql/mariadb container?
- name: Configure apparmor
run: |
set -x
sudo apt-get remove mysql-server --purge
sudo apt-get install apparmor-profiles
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld

- name: Run leia tests
shell: bash
run: yarn leia "./${{ matrix.leia-tests }}/README.md" -c 'Destroy tests' --stdin --shell bash
77 changes: 77 additions & 0 deletions .github/workflows/pr-legacy-php7-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Legacy PHP 7 Tests

on:
pull_request:

jobs:
leia-tests:
runs-on: ${{ matrix.os }}
env:
TERM: xterm
strategy:
matrix:
leia-tests:
- examples/7.0
- examples/7.1
- examples/7.2
lando-versions:
- edge
os:
- ubuntu-20.04
node-version:
- '14'
steps:
# Install deps and cache
# Eventually it would be great if these steps could live in a separate YAML file
# that could be included in line to avoid code duplication
- name: Checkout code
uses: actions/checkout@v2
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Get Yarn cache directory
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Use Yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
- name: Install Yarn dependencies
run: yarn install --prefer-offline --frozen-lockfile

# This block should eventually become use lando/actions-hyperdrive@v2
- name: Verify Docker dependencies
run: |
docker --version | grep "20.10."
docker-compose --version | grep "1.29."
- name: Grab latest edge Lando CLI
run: |
sudo curl -fsSL -o /usr/local/bin/lando "https://files.lando.dev/cli/lando-linux-x64-${{ matrix.lando-versions }}"
sudo chmod +x /usr/local/bin/lando
- name: Move in lando config appropriate for testing
run: |
mkdir -p ~/.lando/cache
cp -f actions-lando-config.yml ~/.lando/config.yml
echo false > ~/.lando/cache/report_errors
lando --clear
- name: Verify Lando works and we are dogfooding this plugin for tests
run: |
lando version
lando config --path plugins | grep php | grep /home/runner/work/php/php || echo "::error:: Not dogfooding this plugin correctly! "

# This block should eventually become use lando/actions-leia@v2
# @NOTE? Do we want a way for our leia-action to configure apparmor since
# this might break a whole bunch of tests? or is this literally just a thing
# for the Lagoon mysql/mariadb container?
- name: Configure apparmor
run: |
set -x
sudo apt-get remove mysql-server --purge
sudo apt-get install apparmor-profiles
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
- name: Run leia tests
shell: bash
run: yarn leia "./${{ matrix.leia-tests }}/README.md" -c 'Destroy tests' --stdin --shell bash
76 changes: 76 additions & 0 deletions .github/workflows/pr-php-extension-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: PHP Extension Tests

on:
pull_request:

jobs:
leia-tests:
runs-on: ${{ matrix.os }}
env:
TERM: xterm
strategy:
matrix:
leia-tests:
- examples/php-extensions
lando-versions:
- edge
os:
- ubuntu-20.04
node-version:
- '14'
steps:

# Install deps and cache
# Eventually it would be great if these steps could live in a separate YAML file
# that could be included in line to avoid code duplication
- name: Checkout code
uses: actions/checkout@v2
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Get Yarn cache directory
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Use Yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
- name: Install Yarn dependencies
run: yarn install --prefer-offline --frozen-lockfile

# This block should eventually become use lando/actions-hyperdrive@v2
- name: Verify Docker dependencies
run: |
docker --version | grep "20.10."
docker-compose --version | grep "1.29."
- name: Grab latest edge Lando CLI
run: |
sudo curl -fsSL -o /usr/local/bin/lando "https://files.lando.dev/cli/lando-linux-x64-${{ matrix.lando-versions }}"
sudo chmod +x /usr/local/bin/lando
- name: Move in lando config appropriate for testing
run: |
mkdir -p ~/.lando/cache
cp -f actions-lando-config.yml ~/.lando/config.yml
echo false > ~/.lando/cache/report_errors
lando --clear
- name: Verify Lando works and we are dogfooding this plugin for tests
run: |
lando version
lando config --path plugins | grep php | grep /home/runner/work/php/php || echo "::error:: Not dogfooding this plugin correctly! "

# This block should eventually become use lando/actions-leia@v2
# @NOTE? Do we want a way for our leia-action to configure apparmor since
# this might break a whole bunch of tests? or is this literally just a thing
# for the Lagoon mysql/mariadb container?
- name: Configure apparmor
run: |
set -x
sudo apt-get remove mysql-server --purge
sudo apt-get install apparmor-profiles
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
- name: Run leia tests
shell: bash
run: yarn leia "./${{ matrix.leia-tests }}/README.md" -c 'Destroy tests' --stdin --shell bash
Loading