Skip to content

Commit d1d88b5

Browse files
authored
use official github action (#21)
* use official github action * Remove expect Test passes with this. If it starts to fail, revert this. --------- Co-authored-by: tyler36 <[email protected]>
1 parent 9e6f4a3 commit d1d88b5

File tree

1 file changed

+9
-59
lines changed

1 file changed

+9
-59
lines changed

.github/workflows/tests.yml

Lines changed: 9 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -18,74 +18,24 @@ defaults:
1818
run:
1919
shell: bash
2020

21-
# This is required for "gautamkrishnar/keepalive-workflow"
22-
permissions:
23-
contents: write
24-
2521
env:
26-
NIGHTLY_DDEV_PR_URL: "https://nightly.link/ddev/ddev/actions/runs/1720215802/ddev-linux-amd64.zip"
27-
# Allow ddev get to use a GitHub token to prevent rate limiting by tests
22+
# Allow ddev get to use a github token to prevent rate limiting by tests
2823
DDEV_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29-
# Pull the same image as in docker-compose.redis.yaml
30-
REDIS_IMAGE: redis:6-bullseye
24+
3125
jobs:
3226
tests:
33-
defaults:
34-
run:
35-
shell: bash
36-
3727
strategy:
3828
matrix:
3929
ddev_version: [stable, HEAD]
40-
# ddev_version: [PR]
4130
fail-fast: false
4231

43-
runs-on: ubuntu-22.04
32+
runs-on: ubuntu-latest
4433

4534
steps:
46-
- uses: actions/checkout@v3
47-
- name: Set up Homebrew
48-
id: set-up-homebrew
49-
uses: Homebrew/actions/setup-homebrew@master
50-
- name: Environment setup
51-
run: |
52-
brew install bats-core mkcert
53-
mkcert -install
54-
55-
- name: Use ddev stable
56-
if: matrix.ddev_version == 'stable'
57-
run: brew install ddev/ddev/ddev
58-
59-
- name: Use ddev edge
60-
if: matrix.ddev_version == 'edge'
61-
run: brew install ddev/ddev-edge/ddev
62-
63-
- name: Use ddev HEAD
64-
if: matrix.ddev_version == 'HEAD'
65-
run: brew install --HEAD ddev/ddev/ddev
66-
67-
- name: Use ddev PR
68-
if: matrix.ddev_version == 'PR'
69-
run: |
70-
curl -sSL -o ddev_linux.zip ${NIGHTLY_DDEV_PR_URL}
71-
unzip ddev_linux.zip
72-
mv ddev /usr/local/bin/ddev && chmod +x /usr/local/bin/ddev
73-
74-
- name: Download docker images
75-
run: |
76-
mkdir junk && pushd junk && ddev config --auto && ddev debug download-images >/dev/null
77-
docker pull ${REDIS_IMAGE} >/dev/null
78-
- name: tmate debugging session
79-
uses: mxschmitt/action-tmate@v3
35+
- uses: ddev/github-action-add-on-test@v1
8036
with:
81-
limit-access-to-actor: true
82-
github-token: ${{ secrets.GITHUB_TOKEN }}
83-
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
84-
85-
- name: tests
86-
run: bats --verbose-run tests
87-
88-
# keepalive-workflow adds a dummy commit if there's no other action here, keeps
89-
# GitHub from turning off tests after 60 days
90-
- uses: gautamkrishnar/keepalive-workflow@v1
91-
if: matrix.ddev_version == 'stable'
37+
ddev_version: ${{ matrix.ddev_version }}
38+
token: ${{ secrets.GITHUB_TOKEN }}
39+
debug_enabled: ${{ github.event.inputs.debug_enabled }}
40+
addon_repository: ${{ env.GITHUB_REPOSITORY }}
41+
addon_ref: ${{ env.GITHUB_REF }}

0 commit comments

Comments
 (0)