-
Notifications
You must be signed in to change notification settings - Fork 143
61 lines (57 loc) · 2.06 KB
/
test-1.5.yml
File metadata and controls
61 lines (57 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build & Test 1.5.x
permissions:
contents: read
on:
pull_request: {}
push:
branches:
- '!master'
paths:
- apache-1.5.x/**
- fpm-1.5.x/**
- fpm-alpin-1.5.x/**
- '.github/workflows/*-1.5.yml'
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-1.5.x'
test-files: 'apache-postgres'
docker-tag: roundcube/roundcubemail:test-apache-1.5.x
- variant: 'fpm-1.5.x'
test-files: 'fpm-postgres'
docker-tag: roundcube/roundcubemail:test-fpm-1.5.x
- variant: 'fpm-alpine-1.5.x'
test-files: 'fpm-postgres'
docker-tag: roundcube/roundcubemail:test-fpm-alpine-1.5.x
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Get docker hub username
id: creds
run: echo 'username=${{ secrets.DOCKER_PULL_USERNAME }}' >> $GITHUB_OUTPUT
- name: Login to Docker Hub
if: steps.creds.outputs.username != ''
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
username: ${{ secrets.DOCKER_PULL_USERNAME }}
password: ${{ secrets.DOCKER_PULL_PASSWORD }}
- name: Build image "${{ matrix.variant }}
run: cd ${{ matrix.variant }} && docker buildx build ./ -t ${{ matrix.docker-tag }}
- name: Run tests
run: |
set -exu;
# Set these here so the values are visible in the logs for debugging.
export ROUNDCUBEMAIL_TEST_IMAGE="${{ matrix.docker-tag }}"
export HTTP_PORT="${{ matrix.http-port || '80' }}"
export SKIP_POST_SETUP_SCRIPT_TEST="yes"
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