From 5fc034e82efcc48a2480aeac527f2ac786ae9351 Mon Sep 17 00:00:00 2001 From: tyler36 <7234392+tyler36@users.noreply.github.com> Date: Tue, 23 Apr 2024 09:12:05 +0900 Subject: [PATCH 1/2] refactor: rename test file inline with other addons --- .github/workflows/cron_tests.yml | 37 -------------------------------- .github/workflows/tests.yml | 37 ++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/cron_tests.yml create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/cron_tests.yml b/.github/workflows/cron_tests.yml deleted file mode 100644 index 84ef535..0000000 --- a/.github/workflows/cron_tests.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: "Daily tests" -on: - 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" - required: false - default: "release" - schedule: - - cron: "25 08 * * *" - -jobs: - run_tests: - name: Run tests - uses: oblakstudio/ddev-redis-7/.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 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: gautamkrishnar/keepalive-workflow@1.2.2 - with: - commit_message: "chore(cron): Keepalive workflow [skip ci]" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..6cb1535 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,37 @@ +name: tests +on: + pull_request: + push: + branches: [ main ] + + schedule: + - cron: '25 08 * * *' + + workflow_dispatch: + inputs: + debug_enabled: + description: 'Debug with tmate set "debug_enabled"' + required: false + default: "false" + +env: + # Allow ddev get to use a github token to prevent rate limiting by tests + DDEV_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + tests: + strategy: + matrix: + ddev_version: [stable, HEAD] + fail-fast: false + + runs-on: ubuntu-latest + + steps: + - uses: ddev/github-action-add-on-test@v1 + with: + 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 }} From 1f1bdb4d8cadcf78aac0c2a6ca1408b55ae8e681 Mon Sep 17 00:00:00 2001 From: tyler36 <7234392+tyler36@users.noreply.github.com> Date: Tue, 23 Apr 2024 09:12:05 +0900 Subject: [PATCH 2/2] chore: bump github-action-add-on-test version --- .github/workflows/tests.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6cb1535..a02dbef 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,6 +18,10 @@ 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: tests: strategy: @@ -28,7 +32,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: ddev/github-action-add-on-test@v1 + - uses: ddev/github-action-add-on-test@v2 with: ddev_version: ${{ matrix.ddev_version }} token: ${{ secrets.GITHUB_TOKEN }}