Skip to content

Commit 467a445

Browse files
authored
Update test workflow to use "github-actions-add-on-test" (#30)
Fixes #27 Co-authored-by: tyler36 <[email protected]>
1 parent a734073 commit 467a445

File tree

1 file changed

+8
-55
lines changed

1 file changed

+8
-55
lines changed

.github/workflows/tests.yml

Lines changed: 8 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: tests
22
on:
33
pull_request:
44
push:
5-
branches: [ main, 20220529_auto_install ]
5+
branches: [ main ]
66

77
schedule:
88
- cron: '01 07 * * *'
@@ -14,67 +14,20 @@ on:
1414
required: false
1515
default: "false"
1616

17-
permissions:
18-
contents: write
19-
20-
defaults:
21-
run:
22-
shell: bash
23-
24-
env:
25-
NIGHTLY_DDEV_PR_URL: "https://nightly.link/ddev/ddev/actions/runs/1720215802/ddev-linux-amd64.zip"
26-
# Allow ddev get to use a github token to prevent rate limiting by tests
27-
DDEV_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28-
2917
jobs:
3018
tests:
31-
defaults:
32-
run:
33-
shell: bash
34-
3519
strategy:
3620
matrix:
3721
ddev_version: [stable, HEAD]
38-
# ddev_version: [stable, edge, HEAD, PR]
3922
fail-fast: false
4023

41-
runs-on: ubuntu-20.04
24+
runs-on: ubuntu-latest
4225

4326
steps:
44-
- uses: actions/checkout@v2
45-
- name: Set up Homebrew
46-
id: set-up-homebrew
47-
uses: Homebrew/actions/setup-homebrew@master
48-
- name: Environment setup
49-
run: |
50-
brew install bats-core
51-
52-
- name: Use ddev stable
53-
if: matrix.ddev_version == 'stable'
54-
run: brew install ddev/ddev/ddev
55-
56-
- name: Use ddev edge
57-
if: matrix.ddev_version == 'edge'
58-
run: brew install ddev/ddev-edge/ddev
59-
60-
- name: Use ddev HEAD
61-
if: matrix.ddev_version == 'HEAD'
62-
run: brew install --HEAD ddev/ddev/ddev
63-
64-
- name: Download docker images
65-
run: |
66-
mkdir junk && pushd junk && ddev config --auto && ddev debug download-images >/dev/null
67-
docker pull memcached:1.6 >/dev/null
68-
- name: tmate debugging session
69-
uses: mxschmitt/action-tmate@v3
27+
- uses: ddev/github-action-add-on-test@v0
7028
with:
71-
limit-access-to-actor: true
72-
github-token: ${{ secrets.GITHUB_TOKEN }}
73-
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
74-
75-
- name: tests
76-
run: bats tests
77-
78-
# keepalive-workflow adds a dummy commit if there's no other action here, keeps
79-
# GitHub from turning off tests after 60 days
80-
- uses: gautamkrishnar/keepalive-workflow@v1
29+
ddev_version: ${{ matrix.ddev_version }}
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
debug_enabled: ${{ github.event.inputs.debug_enabled }}
32+
addon_repository: ${{ env.GITHUB_REPOSITORY }}
33+
addon_ref: ${{ env.GITHUB_REF }}

0 commit comments

Comments
 (0)