Parametrize test images
authorThomas Bruederli <redacted>
Sun, 12 Mar 2023 22:20:09 +0000 (23:20 +0100)
committerThomas Bruederli <redacted>
Sun, 12 Mar 2023 22:20:09 +0000 (23:20 +0100)
+ clean-up yaml syntax

.github/workflows/build.yml
.github/workflows/test.yml

index 4990621028b34a0420c1b20ea59221459627ac87..642984d5a4c2d84dd41ca40925d308813d2060da 100644 (file)
@@ -1,7 +1,7 @@
 name: Build & Publish
 on:
   push:
-    branches: 
+    branches:
       - 'master'
     paths-ignore:
       - 'README.md'
@@ -20,12 +20,15 @@ jobs:
           - variant: 'apache'
             test-files: 'apache-postgres'
             docker-tag: roundcube/roundcubemail:1.6.x-apache,roundcube/roundcubemail:1.6.1-apache,roundcube/roundcubemail:latest-apache,roundcube/roundcubemail:latest
+            test-tag: roundcube/roundcubemail:latest-apache
           - variant: 'fpm'
             test-files: 'fpm-postgres'
             docker-tag: roundcube/roundcubemail:1.6.x-fpm,roundcube/roundcubemail:1.6.1-fpm,roundcube/roundcubemail:latest-fpm
+            test-tag: roundcube/roundcubemail:latest-fpm
           - variant: 'fpm-alpine'
             test-files: 'fpm-postgres'
             docker-tag: roundcube/roundcubemail:1.6.x-fpm-alpine,roundcube/roundcubemail:1.6.1-fpm-alpine,roundcube/roundcubemail:latest-fpm-alpine
+            test-tag: roundcube/roundcubemail:latest-fpm-alpine
     steps:
       - name: Checkout repository
         uses: actions/checkout@v3
@@ -51,10 +54,13 @@ jobs:
         with:
           context: ${{ matrix.variant }}
           platforms: "linux/arm64,linux/arm/v6,linux/arm/v7,linux/s390x,linux/ppc64le,linux/386,linux/amd64,"
-          push: true 
+          push: true
           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
+
       - name: Run tests
+        env:
+          ROUNDCUBEMAIL_TEST_IMAGE: ${{ matrix.test-tag }}
         run: |
           set -exu;
           for testFile in ${{ join(matrix.test-files, ' ') }};
@@ -62,5 +68,3 @@ jobs:
             docker-compose -f ./tests/docker-compose.test-${testFile}.yml \
             up --exit-code-from=sut --abort-on-container-exit
           done
-          
-
index 27f6ce63ff6c12e4fc6941245e5aa668e6dcadfc..5fe98cfacc18ab7e1c1d0b02fecc2317a7003074 100644 (file)
@@ -2,7 +2,7 @@ name: Build & Test
 on:
   pull_request: {}
   push:
-    branches: 
+    branches:
       - '!master'
 jobs:
   build-and-testvariants:
git clone https://git.99rst.org/PROJECT