From 69cdfa3b372598c3c7e401a8c418ae210ac3ec78 Mon Sep 17 00:00:00 2001 From: tyler36 <7234392+tyler36@users.noreply.github.com> Date: Fri, 26 Jan 2024 01:08:39 +0000 Subject: [PATCH] use official testing action --- .github/workflows/tests.yml | 64 +++++-------------------------------- 1 file changed, 8 insertions(+), 56 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 12369b5..f0a5673 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,69 +13,21 @@ on: description: 'Debug with tmate set "debug_enabled"' required: false default: "false" - -defaults: - run: - shell: bash - -env: - NIGHTLY_DDEV_PR_URL: "https://nightly.link/drud/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 }} - + jobs: tests: - defaults: - run: - shell: bash - strategy: matrix: ddev_version: [stable, HEAD] -# ddev_version: [stable, edge, HEAD, PR] fail-fast: false - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Homebrew - id: set-up-homebrew - uses: Homebrew/actions/setup-homebrew@master - - name: Environment setup - run: | - brew install bats-core mkcert - mkcert -install - - - name: Use ddev stable - if: matrix.ddev_version == 'stable' - run: brew install drud/ddev/ddev - - - name: Use ddev edge - if: matrix.ddev_version == 'edge' - run: brew install drud/ddev-edge/ddev - - - name: Use ddev HEAD - if: matrix.ddev_version == 'HEAD' - run: brew install --HEAD drud/ddev/ddev - - - name: Use ddev PR - if: matrix.ddev_version == 'PR' - run: | - curl -sSL -o ddev_linux.zip ${NIGHTLY_DDEV_PR_URL} - unzip ddev_linux.zip - mv ddev /usr/local/bin/ddev && chmod +x /usr/local/bin/ddev - - - name: Download docker images - run: | - mkdir junk && pushd junk && ddev config --auto && ddev debug download-images >/dev/null - docker pull memcached:1.6 >/dev/null - - name: tmate debugging session - uses: mxschmitt/action-tmate@v3 + - uses: ddev/github-action-add-on-test@v0 with: - limit-access-to-actor: true - github-token: ${{ secrets.GITHUB_TOKEN }} - if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} - - - name: tests - run: bats tests + 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 }}