From 39c9fd1832fb391f449ae51726617981a5941e09 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 4 Jul 2025 14:10:47 +0200 Subject: [PATCH 1/9] typofix --- .github/workflows/solid-tests-suites.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/solid-tests-suites.yml b/.github/workflows/solid-tests-suites.yml index 74d61e9..b75f312 100644 --- a/.github/workflows/solid-tests-suites.yml +++ b/.github/workflows/solid-tests-suites.yml @@ -8,7 +8,7 @@ env: on: push: branches: - - main + - workflow pull_request: branches: [ main ] # Allow manually triggering the workflow. @@ -52,7 +52,7 @@ jobs: docker build \ --tag "solid-php:${{ env.TAG }}" \ --tag "ghcr.io/${{ github.repository }}:${{ env.TAG }}" \ - -f docker\solid.Dockerfile \ + -f docker/solid.Dockerfile \ . docker push "ghcr.io/${{ github.repository }}:${{ env.TAG }}" mkdir -p cache/solid-php From bdcc62874401edc2e8658f0c149a57d9496b22f2 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 4 Jul 2025 14:15:06 +0200 Subject: [PATCH 2/9] directly run --- .github/workflows/solid-tests-suites.yml | 44 ------------------------ 1 file changed, 44 deletions(-) diff --git a/.github/workflows/solid-tests-suites.yml b/.github/workflows/solid-tests-suites.yml index b75f312..7ed5cf4 100644 --- a/.github/workflows/solid-tests-suites.yml +++ b/.github/workflows/solid-tests-suites.yml @@ -21,43 +21,6 @@ concurrency: cancel-in-progress: true jobs: - # @TODO: Instead of building the docker image here, take a pre-build image and mount the code? - # (only build when the Dockerfile changes) Or only push when tagged/main? - build-docker: - runs-on: ubuntu-latest - steps: - - name: Create docker tag from git reference - # A tag name may only contain lower- and uppercase letters, digits, underscores, periods and dashes. - run: | - echo "TAG=$(echo -n "${{ github.ref_name }}" \ - | tr --complement --squeeze-repeats '[:alnum:]._-' '_')" \ - >> "${GITHUB_ENV}" - - - uses: actions/cache@v4 - id: cache-solid-php-docker - with: - path: cache/solid-php - key: solid-php-${{ github.sha }} - - - uses: actions/checkout@v4 - - - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build Solid-PHP - run: | - docker build \ - --tag "solid-php:${{ env.TAG }}" \ - --tag "ghcr.io/${{ github.repository }}:${{ env.TAG }}" \ - -f docker/solid.Dockerfile \ - . - docker push "ghcr.io/${{ github.repository }}:${{ env.TAG }}" - mkdir -p cache/solid-php - docker image save solid-php:${{ env.TAG }} --output ./cache/solid-php/${{ github.sha }}.tar - solid-testsuite: timeout-minutes: 30 needs: @@ -90,13 +53,6 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - # FIXME: The `docker pull` should be moved to a previous step and cached - - name: Pull docker Images - run: | - docker image load --input ./cache/solid-php/${{ github.sha }}.tar - docker pull ${{ matrix.test }} - docker pull ghcr.io/pdsinterop/php-solid-pubsub-server:${{ env.PUBSUB_TAG }} - - name: Start Docker Containers run: | ./tests/testsuite/run-solid-test-suite.sh From 72d7cb37b08ed4f688ce712371873311e2c89ef4 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 4 Jul 2025 14:16:42 +0200 Subject: [PATCH 3/9] no needs --- .github/workflows/solid-tests-suites.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/solid-tests-suites.yml b/.github/workflows/solid-tests-suites.yml index 7ed5cf4..7797c0f 100644 --- a/.github/workflows/solid-tests-suites.yml +++ b/.github/workflows/solid-tests-suites.yml @@ -23,9 +23,6 @@ concurrency: jobs: solid-testsuite: timeout-minutes: 30 - needs: - - build-docker - runs-on: ubuntu-latest strategy: From 1b4b9e3441ef9b53e0e0fa80fd00fc8c77318876 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 4 Jul 2025 14:21:15 +0200 Subject: [PATCH 4/9] ignore vendor directory, add composer install --- docker/solid.Dockerfile | 4 ++++ docker/solid.Dockerfile.dockerignore | 1 + 2 files changed, 5 insertions(+) diff --git a/docker/solid.Dockerfile b/docker/solid.Dockerfile index 36eb513..a3896bd 100755 --- a/docker/solid.Dockerfile +++ b/docker/solid.Dockerfile @@ -7,4 +7,8 @@ RUN a2enmod rewrite allowmethods ssl COPY . /opt/solid COPY ./docker/solid.conf /etc/apache2/sites-enabled/000-default.conf + +COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer +RUN composer install --working-dir=/opt/solid --prefer-dist + EXPOSE 443 diff --git a/docker/solid.Dockerfile.dockerignore b/docker/solid.Dockerfile.dockerignore index 3e23699..f880b1d 100644 --- a/docker/solid.Dockerfile.dockerignore +++ b/docker/solid.Dockerfile.dockerignore @@ -1,3 +1,4 @@ keys/ pods/ db/ +vendor/ \ No newline at end of file From 6515484b936e065d2cb59041ac8a37fef3fe7e00 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 4 Jul 2025 14:22:44 +0200 Subject: [PATCH 5/9] add git and unzip for composer --- docker/solid.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/solid.Dockerfile b/docker/solid.Dockerfile index a3896bd..3e65df0 100755 --- a/docker/solid.Dockerfile +++ b/docker/solid.Dockerfile @@ -1,7 +1,7 @@ FROM php:8.3-apache LABEL maintainer="yvo@muze.nl" RUN apt-get update -RUN apt-get install -y ssl-cert +RUN apt-get install -y ssl-cert git unzip RUN docker-php-ext-install bcmath RUN a2enmod rewrite allowmethods ssl From a53876ea20b036f7f4e180652fbfde2ab353677a Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 4 Jul 2025 14:27:05 +0200 Subject: [PATCH 6/9] remove debug --- tests/testsuite/run-solid-test-suite.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/testsuite/run-solid-test-suite.sh b/tests/testsuite/run-solid-test-suite.sh index d358ed4..9917402 100755 --- a/tests/testsuite/run-solid-test-suite.sh +++ b/tests/testsuite/run-solid-test-suite.sh @@ -90,7 +90,6 @@ function runTests { --env SERVER_ROOT_ECSAPED="$ALICE_SERVER_ROOT_ESCAPED" \ --env SECOND_SERVER_ROOT="$BOB_SERVER_ROOT" \ --env OIDC_ISSUER="$ALICE_OIDC_ISSUER" \ -# --env DEBUG=* \ "$1-tests" } From 240e8f9120d21f8fac29cfb1d664c762edd4bed5 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 4 Jul 2025 14:32:54 +0200 Subject: [PATCH 7/9] cleanup, ready to merge if passing --- .github/workflows/solid-tests-suites.yml | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/.github/workflows/solid-tests-suites.yml b/.github/workflows/solid-tests-suites.yml index 7797c0f..4fab5db 100644 --- a/.github/workflows/solid-tests-suites.yml +++ b/.github/workflows/solid-tests-suites.yml @@ -1,14 +1,10 @@ --- name: Solid Test Suites -env: - # Docker Hub digest (i.e. hash) of the used Docker Images that do not have a version tag. - PUBSUB_TAG: latest@sha256:b73a2a5c98d2005bb667dfc69d1c859d704366024298b9caa24ea2e182c456c2 - on: push: branches: - - workflow + - main pull_request: branches: [ main ] # Allow manually triggering the workflow. @@ -29,21 +25,6 @@ jobs: fail-fast: false steps: - - name: Create docker tag from git reference - # A tag name may only contain lower- and uppercase letters, digits, underscores, periods and dashes. - run: | - echo "TAG=$(echo -n "${{ github.ref_name }}" \ - | tr --complement --squeeze-repeats '[:alnum:]._-' '_')" \ - >> "${GITHUB_ENV}" - - - uses: actions/checkout@v4 - - - uses: actions/cache@v4 - id: cache-solid-php-docker - with: - path: cache/solid-php - key: solid-php-docker-${{ github.sha }} - - uses: docker/login-action@v3 with: registry: ghcr.io From 49b79c0428488ffe4aca6c11658659ad7c6306fb Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 4 Jul 2025 14:34:13 +0200 Subject: [PATCH 8/9] Revert "cleanup, ready to merge if passing" This reverts commit 240e8f9120d21f8fac29cfb1d664c762edd4bed5. --- .github/workflows/solid-tests-suites.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/solid-tests-suites.yml b/.github/workflows/solid-tests-suites.yml index 4fab5db..7797c0f 100644 --- a/.github/workflows/solid-tests-suites.yml +++ b/.github/workflows/solid-tests-suites.yml @@ -1,10 +1,14 @@ --- name: Solid Test Suites +env: + # Docker Hub digest (i.e. hash) of the used Docker Images that do not have a version tag. + PUBSUB_TAG: latest@sha256:b73a2a5c98d2005bb667dfc69d1c859d704366024298b9caa24ea2e182c456c2 + on: push: branches: - - main + - workflow pull_request: branches: [ main ] # Allow manually triggering the workflow. @@ -25,6 +29,21 @@ jobs: fail-fast: false steps: + - name: Create docker tag from git reference + # A tag name may only contain lower- and uppercase letters, digits, underscores, periods and dashes. + run: | + echo "TAG=$(echo -n "${{ github.ref_name }}" \ + | tr --complement --squeeze-repeats '[:alnum:]._-' '_')" \ + >> "${GITHUB_ENV}" + + - uses: actions/checkout@v4 + + - uses: actions/cache@v4 + id: cache-solid-php-docker + with: + path: cache/solid-php + key: solid-php-docker-${{ github.sha }} + - uses: docker/login-action@v3 with: registry: ghcr.io From 3c8a0b299e23e33a31a5221a74abf9bfedd84f6a Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Fri, 4 Jul 2025 14:35:37 +0200 Subject: [PATCH 9/9] cleanup second try --- .github/workflows/solid-tests-suites.yml | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/.github/workflows/solid-tests-suites.yml b/.github/workflows/solid-tests-suites.yml index 7797c0f..4a475d8 100644 --- a/.github/workflows/solid-tests-suites.yml +++ b/.github/workflows/solid-tests-suites.yml @@ -1,10 +1,6 @@ --- name: Solid Test Suites -env: - # Docker Hub digest (i.e. hash) of the used Docker Images that do not have a version tag. - PUBSUB_TAG: latest@sha256:b73a2a5c98d2005bb667dfc69d1c859d704366024298b9caa24ea2e182c456c2 - on: push: branches: @@ -29,27 +25,14 @@ jobs: fail-fast: false steps: - - name: Create docker tag from git reference - # A tag name may only contain lower- and uppercase letters, digits, underscores, periods and dashes. - run: | - echo "TAG=$(echo -n "${{ github.ref_name }}" \ - | tr --complement --squeeze-repeats '[:alnum:]._-' '_')" \ - >> "${GITHUB_ENV}" - - uses: actions/checkout@v4 - - uses: actions/cache@v4 - id: cache-solid-php-docker - with: - path: cache/solid-php - key: solid-php-docker-${{ github.sha }} - - uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Start Docker Containers + - name: Run Solid Test Suite run: | ./tests/testsuite/run-solid-test-suite.sh