Run tests for split paths
authorPablo Zmdl <redacted>
Wed, 4 Jun 2025 09:26:39 +0000 (11:26 +0200)
committerPablo Zmdl <redacted>
Wed, 4 Jun 2025 10:08:48 +0000 (12:08 +0200)
This is not the most elegant solution, but it's simple and good enough
for now.

.github/workflows/test-1.5.yml [new file with mode: 0644]
.github/workflows/test.yml

diff --git a/.github/workflows/test-1.5.yml b/.github/workflows/test-1.5.yml
new file mode 100644 (file)
index 0000000..09dc7d4
--- /dev/null
@@ -0,0 +1,59 @@
+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/**
+
+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 '::set-output name=username::${{ secrets.DOCKER_PULL_USERNAME }}'
+      - 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' }}"
+          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
index a946b3cd8b807623fa5f4038a73ef85ac05394d9..fb81d91ed01333a8453c5e0475137f696b3caf8b 100644 (file)
@@ -8,6 +8,11 @@ on:
   push:
     branches:
       - '!master'
+    paths-ignore:
+      - apache-1.5.x/**
+      - fpm-1.5.x/**
+      - fpm-alpine-1.5.x/**
+
 jobs:
   build-and-testvariants:
     name: Build image variants and run tests
git clone https://git.99rst.org/PROJECT