Skip to content

Commit d649ea6

Browse files
ci(tests): Use ddev/github-action-add-on-test
1 parent 48239ce commit d649ea6

File tree

1 file changed

+11
-61
lines changed

1 file changed

+11
-61
lines changed

.github/workflows/tests.yml

Lines changed: 11 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ on:
33
pull_request:
44
push:
55
branches: [ main ]
6+
paths-ignore:
7+
- '**.md'
68

79
schedule:
8-
- cron: '06 07 * * *'
10+
- cron: '06 07 * * *'
911

1012
workflow_dispatch:
1113
inputs:
@@ -15,77 +17,25 @@ on:
1517
required: false
1618
default: false
1719

18-
defaults:
19-
run:
20-
shell: bash
21-
2220
# This is required for "gautamkrishnar/keepalive-workflow"
2321
permissions:
2422
contents: write
2523

26-
env:
27-
NIGHTLY_DDEV_PR_URL: "https://nightly.link/ddev/ddev/actions/runs/1720215802/ddev-linux-amd64.zip"
28-
# Allow ddev get to use a github token to prevent rate limiting by tests
29-
DDEV_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30-
3124
jobs:
3225
tests:
33-
defaults:
34-
run:
35-
shell: bash
3626

3727
strategy:
3828
matrix:
3929
ddev_version: [stable, HEAD]
40-
# ddev_version: [PR]
4130
fail-fast: false
4231

43-
runs-on: ubuntu-20.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-
78-
- name: tmate debugging session
79-
uses: mxschmitt/action-tmate@v3
80-
with:
81-
limit-access-to-actor: true
82-
github-token: ${{ secrets.GITHUB_TOKEN }}
83-
if: github.event.inputs.debug_enabled == 'true'
84-
85-
- name: tests
86-
run: bats 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'
35+
- uses: ddev/github-action-add-on-test@v1
36+
with:
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)