From 77558492d7a437992ab13c68d2330d5a0e780089 Mon Sep 17 00:00:00 2001 From: Sibin Grasic Date: Tue, 9 Jul 2024 16:51:48 +0200 Subject: [PATCH 1/2] chore(CI): Reworked workflows --- .github/workflows/cron_tests.yml | 57 +++++++------ .github/workflows/pull_request.yml | 7 +- .github/workflows/release.yml | 12 +-- .../workflows/reusable_test_ddev_addon.yml | 82 ------------------- 4 files changed, 41 insertions(+), 117 deletions(-) delete mode 100644 .github/workflows/reusable_test_ddev_addon.yml diff --git a/.github/workflows/cron_tests.yml b/.github/workflows/cron_tests.yml index e03a465..c434646 100644 --- a/.github/workflows/cron_tests.yml +++ b/.github/workflows/cron_tests.yml @@ -1,37 +1,42 @@ name: "Daily tests" on: + pull_request: + push: + branches: + - master + + schedule: + - cron: "25 08 * * *" + workflow_dispatch: inputs: debug_enabled: - type: boolean - description: Debug with tmate - required: false - default: false - ddev_version: - type: string - description: DDEV version to test - required: false - default: '["stable"]' - test_type: - type: string - description: Test type to run. Can be "local" or "release" + description: 'Debug with tmate set "debug_enabled"' required: false - default: "release" - schedule: - - cron: "25 08 * * *" + default: "false" + +env: + # Allow ddev get to use a github token to prevent rate limiting by tests + DDEV_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +# Required permissions for keep-alive, used by ddev/github-action-add-on-test +permissions: + actions: write jobs: - run_tests: - name: Run tests - uses: oblakstudio/ddev-ioncube/.github/workflows/reusable_test_ddev_addon.yml@master - with: - ddev_version: '["stable", "HEAD", "edge"]' - test_type: "release" - keep-the-job-alive: - name: Keep the job alive + tests: + strategy: + matrix: + ddev_version: [stable, HEAD] + fail-fast: false + runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v4 - - uses: gautamkrishnar/keepalive-workflow@1.2.6 + - uses: ddev/github-action-add-on-test@v2 with: - commit_message: "chore(cron): Keepalive workflow [skip ci]" + ddev_version: ${{ matrix.ddev_version }} + token: ${{ secrets.GITHUB_TOKEN }} + debug_enabled: ${{ github.event.inputs.debug_enabled }} + addon_repository: ${{ env.GITHUB_REPOSITORY }} + addon_ref: ${{ env.GITHUB_REF }} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 3270489..c43b926 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -1,11 +1,16 @@ name: "Test DDEV Addon" on: pull_request: + paths-ignore: + - "README.md" + - ".github/workflows/*.yml" merge_group: jobs: run_tests: name: Run tests - uses: oblakstudio/ddev-ioncube/.github/workflows/reusable_test_ddev_addon.yml@master + uses: oblakstudio/public-workflows/.github/workflows/ddev-test_addon.yaml@v1 + secrets: inherit with: test_type: "local" + os: '["ubuntu-latest"]' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index efb175c..72e5698 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,13 +15,13 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - token: ${{ secrets.OBLAK_BOT_TOKEN }} + token: ${{ secrets.OBLAKBOT_PAT }} - name: Import GPG keys uses: crazy-max/ghaction-import-gpg@v6 id: gpg with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.GPG_PASSPHRASE }} + gpg_private_key: ${{ secrets.OBLAKBOT_GPG_KEY }} + passphrase: ${{ secrets.OBLAKBOT_GPG_PASS }} git_config_global: true git_user_signingkey: true git_commit_gpgsign: true @@ -32,8 +32,4 @@ jobs: @semantic-release/github @semantic-release/exec env: - GIT_AUTHOR_NAME: ${{ steps.gpg.outputs.name}} - GIT_AUTHOR_EMAIL: ${{ steps.gpg.outputs.email}} - GIT_COMMITTER_NAME: ${{ steps.gpg.outputs.name}} - GIT_COMMITTER_EMAIL: ${{ steps.gpg.outputs.email}} - GITHUB_TOKEN: ${{ secrets.OBLAK_BOT_TOKEN }} + token: ${{ secrets.OBLAKBOT_PAT }} diff --git a/.github/workflows/reusable_test_ddev_addon.yml b/.github/workflows/reusable_test_ddev_addon.yml deleted file mode 100644 index e51b717..0000000 --- a/.github/workflows/reusable_test_ddev_addon.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: Test DDEV addon -on: - workflow_call: - inputs: - debug_enabled: - type: boolean - description: Debug with tmate - required: false - default: false - ddev_version: - type: string - description: DDEV version to test - required: false - default: '["stable"]' - test_type: - type: string - description: Test type to run. Can be "local" or "release" - required: false - default: "release" - - # This is required for "gautamkrishnar/keepalive-workflow" -permissions: - contents: write - -defaults: - run: - shell: bash - -env: - # NIGHTLY_DDEV_PR_URL: "https://nightly.link/ddev/ddev/actions/runs/1720215802/ddev-linux-amd64.zip" - # Allow ddev get to use a github token to prevent rate limiting by tests - DDEV_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Allow `--HEAD` flag when running tests against HEAD - -jobs: - run_ddev_tests: - name: Test ${{ matrix.ddev_version }} - defaults: - run: - shell: bash - runs-on: ubuntu-latest - strategy: - matrix: - ddev_version: ${{ fromJSON(inputs.ddev_version)}} - fail-fast: false - - steps: - - uses: actions/checkout@v4 - - name: Set up Homebrew - id: set-up-homebrew - uses: Homebrew/actions/setup-homebrew@master - - - name: Environment setup - run: | - brew tap bats-core/bats-core - brew install bats-core bats-support bats-assert mkcert - mkcert -install - - - name: Use ddev edge - if: matrix.ddev_version == 'edge' - run: brew install ddev/ddev-edge/ddev - - - name: Use ddev HEAD - if: matrix.ddev_version == 'HEAD' - run: brew install --HEAD ddev/ddev/ddev - - - name: Use ddev stable - if: matrix.ddev_version == 'stable' - run: brew install ddev/ddev/ddev - - - name: Download docker images - run: mkdir junk && pushd junk && ddev config --auto && ddev debug download-images >/dev/null - - - name: tmate debugging session - uses: mxschmitt/action-tmate@v3 - with: - limit-access-to-actor: true - github-token: ${{ secrets.GITHUB_TOKEN }} - if: inputs.debug_enabled == 'true' - - - name: Run BATS - run: bats tests --filter-tags ${{ inputs.test_type }} From 549d67a5a4c84684d0529c60b34e0b89daa8586e Mon Sep 17 00:00:00 2001 From: Sibin Grasic Date: Tue, 9 Jul 2024 16:51:57 +0200 Subject: [PATCH 2/2] feat: Added PHP 8.3 support --- web-build/ioncube/modify-dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web-build/ioncube/modify-dockerfile b/web-build/ioncube/modify-dockerfile index df93651..00348be 100755 --- a/web-build/ioncube/modify-dockerfile +++ b/web-build/ioncube/modify-dockerfile @@ -35,7 +35,7 @@ remove_directives() { add_directives() { local FILE_PATH="$1" - local PHP_VERSIONS=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.1" "8.2") + local PHP_VERSIONS=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.1" "8.2" "8.3") cat <>"$FILE_PATH" # BEGIN IonCube Install