mirror of
https://github.com/roundcube/roundcubemail-docker.git
synced 2025-10-27 05:50:59 +01:00
Add unzip binary + separate actions to test and publish (#209)
* Include unzip package to avoid composer warnings * Separate actions to test and publish * Exclude builds on changes to README.md and examples
This commit is contained in:
parent
d442c900e3
commit
c744ce9dc7
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
@ -1,5 +1,13 @@
|
|||||||
name: Build Docker image
|
name: Build & Publish
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
paths:
|
||||||
|
- '!README.md'
|
||||||
|
- '!examples/**'
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
jobs:
|
jobs:
|
||||||
build-and-testvariants:
|
build-and-testvariants:
|
||||||
name: Build image variants and run tests
|
name: Build image variants and run tests
|
||||||
@ -47,8 +55,6 @@ jobs:
|
|||||||
tags: ${{ matrix.docker-tag }}
|
tags: ${{ matrix.docker-tag }}
|
||||||
# does not work linux/arm/v5 AND linux/mips64le - composer does not support mips64le or armv5 nor does the php image support them on the alpine variant
|
# does not work linux/arm/v5 AND linux/mips64le - composer does not support mips64le or armv5 nor does the php image support them on the alpine variant
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
env:
|
|
||||||
ROUNDCUBEMAIL_TEST_IMAGE: ${{ matrix.docker-tag }}
|
|
||||||
run: |
|
run: |
|
||||||
set -exu;
|
set -exu;
|
||||||
for testFile in ${{ join(matrix.test-files, ' ') }};
|
for testFile in ${{ join(matrix.test-files, ' ') }};
|
||||||
|
|||||||
51
.github/workflows/test.yml
vendored
Normal file
51
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
name: Build & Test
|
||||||
|
on:
|
||||||
|
pull_request: {}
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '!master'
|
||||||
|
jobs:
|
||||||
|
build-and-testvariants:
|
||||||
|
name: Build image variants and run tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
max-parallel: 10
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- variant: 'apache'
|
||||||
|
test-files: 'apache-postgres'
|
||||||
|
docker-tag: roundcube/roundcubemail:test-apache
|
||||||
|
- variant: 'fpm'
|
||||||
|
test-files: 'fpm-postgres'
|
||||||
|
docker-tag: roundcube/roundcubemail:test-fpm
|
||||||
|
- variant: 'fpm-alpine'
|
||||||
|
test-files: 'fpm-postgres'
|
||||||
|
docker-tag: roundcube/roundcubemail:test-fpm-alpine
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Get docker hub username
|
||||||
|
id: creds
|
||||||
|
run: echo '::set-output name=username::${{ secrets.DOCKER_PULL_USERNAME }}'
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
if: steps.creds.outputs.username != ''
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_PULL_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PULL_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build image for "${{ matrix.variant }}"
|
||||||
|
run: cd ${{ matrix.variant }} && docker buildx build ./ -t ${{ matrix.docker-tag }}
|
||||||
|
- name: Run tests
|
||||||
|
env:
|
||||||
|
ROUNDCUBEMAIL_TEST_IMAGE: ${{ matrix.docker-tag }}
|
||||||
|
run: |
|
||||||
|
set -exu;
|
||||||
|
for testFile in ${{ join(matrix.test-files, ' ') }};
|
||||||
|
do
|
||||||
|
docker-compose -f ./tests/docker-compose.test-${testFile}.yml \
|
||||||
|
up --exit-code-from=sut --abort-on-container-exit
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
@ -60,6 +60,7 @@ RUN set -ex; \
|
|||||||
aspell \
|
aspell \
|
||||||
aspell-en \
|
aspell-en \
|
||||||
rsync \
|
rsync \
|
||||||
|
unzip \
|
||||||
; \
|
; \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,8 @@ RUN set -ex; \
|
|||||||
rsync \
|
rsync \
|
||||||
tzdata \
|
tzdata \
|
||||||
aspell \
|
aspell \
|
||||||
aspell-en
|
aspell-en \
|
||||||
|
unzip
|
||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
\
|
\
|
||||||
|
|||||||
@ -60,6 +60,7 @@ RUN set -ex; \
|
|||||||
aspell \
|
aspell \
|
||||||
aspell-en \
|
aspell-en \
|
||||||
rsync \
|
rsync \
|
||||||
|
unzip \
|
||||||
; \
|
; \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,8 @@ RUN set -ex; \
|
|||||||
rsync \
|
rsync \
|
||||||
tzdata \
|
tzdata \
|
||||||
aspell \
|
aspell \
|
||||||
aspell-en
|
aspell-en \
|
||||||
|
unzip
|
||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
\
|
\
|
||||||
|
|||||||
@ -60,6 +60,7 @@ RUN set -ex; \
|
|||||||
aspell \
|
aspell \
|
||||||
aspell-en \
|
aspell-en \
|
||||||
rsync \
|
rsync \
|
||||||
|
unzip \
|
||||||
; \
|
; \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ version: "2"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
roundcubemail:
|
roundcubemail:
|
||||||
image: roundcube/roundcubemail:1.6.0-apache
|
image: ${ROUNDCUBEMAIL_TEST_IMAGE:-roundcube/roundcubemail:latest-apache}
|
||||||
healthcheck:
|
healthcheck:
|
||||||
# To make it obvious in logs "ping=ping" is added
|
# To make it obvious in logs "ping=ping" is added
|
||||||
test: ["CMD", "curl", "--fail", "http://localhost/?ping=ping"]
|
test: ["CMD", "curl", "--fail", "http://localhost/?ping=ping"]
|
||||||
|
|||||||
@ -2,7 +2,7 @@ version: "2"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
roundcubemail-fpm:
|
roundcubemail-fpm:
|
||||||
image: roundcube/roundcubemail:1.6.0-fpm
|
image: ${ROUNDCUBEMAIL_TEST_IMAGE:-roundcube/roundcubemail:latest-fpm}
|
||||||
healthcheck:
|
healthcheck:
|
||||||
# Check until the FPM port is in in the LISTEN list
|
# Check until the FPM port is in in the LISTEN list
|
||||||
# test: ["CMD-SHELL", "netstat -an | grep -q -F \":9000\""]
|
# test: ["CMD-SHELL", "netstat -an | grep -q -F \":9000\""]
|
||||||
@ -91,4 +91,4 @@ networks:
|
|||||||
roundcube_test_net:
|
roundcube_test_net:
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
www-vol:
|
www-vol:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user