From: Pablo Zmdl Date: Wed, 4 Jun 2025 09:26:39 +0000 (+0200) Subject: Run tests for split paths X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=f67dff7e990aebc2d9f8817c34d84052cb7daef6;p=roundcube-roundcubemail-docker.git Run tests for split paths This is not the most elegant solution, but it's simple and good enough for now. --- diff --git a/.github/workflows/test-1.5.yml b/.github/workflows/test-1.5.yml new file mode 100644 index 0000000..09dc7d4 --- /dev/null +++ b/.github/workflows/test-1.5.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a946b3c..fb81d91 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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