-
-
Notifications
You must be signed in to change notification settings - Fork 5
85 lines (78 loc) · 2.57 KB
/
add-ons-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Add-ons test
on:
push:
branches:
- main
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"
schedule:
- cron: "25 08 * * *"
workflow_dispatch:
inputs:
action_ref:
description: The ref to use for the action (tag, branch, SHA)
required: false
type: string
default: ""
workflow_call:
inputs:
action_ref:
description: The ref to use for the action (tag, branch, SHA)
required: false
type: string
default: ""
permissions:
contents: read
jobs:
add-ons-test:
strategy:
fail-fast: false
matrix:
ddev_version: [stable, HEAD]
add_on:
- name: ddev/ddev-redis-commander
test_command: "bats tests"
- name: ddev/ddev-mongo
test_command: ""
- name: ddev/ddev-adminer
test_command: ""
- name: ddev/ddev-redis
test_command: ""
- name: ddev/ddev-solr
test_command: ""
- name: ddev/ddev-pdfreactor
test_command: ""
- name: ddev/ddev-memcached
test_command: ""
- name: ddev/ddev-cron
test_command: ""
- name: ddev/ddev-elasticsearch
test_command: ""
name: Add-on test
runs-on: ubuntu-latest
steps:
- name: Clone current repository
uses: actions/checkout@v4
- name: Retrieve last tag of add-on
id: last_tag
run: |
echo "add_on_last_tag=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/${{ matrix.add_on.name }}/releases/latest | grep -oP "\/tag\/\K(.*)$")" >> $GITHUB_OUTPUT
- name: Set action ref
env:
ACTION_REF: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.action_ref || inputs.action_ref }}
id: set_action_call
run: |
if [ -z "${{ env.ACTION_REF }}" ]
then
echo "action_ref=$(echo './')" >> $GITHUB_OUTPUT
else
echo "action_ref=$(echo ddev/ddev-add-on-test/@${{ env.ACTION_REF }})" >> $GITHUB_OUTPUT
fi
- name: Run add-on test
uses: jenseng/dynamic-uses@v1
with:
uses: ${{ steps.set_action_call.outputs.action_ref }}
with: '{"ddev_version": "${{ matrix.ddev_version }}", "token": "${{ secrets.GITHUB_TOKEN }}", "addon_repository": "${{ matrix.add_on.name }}", "addon_ref": "${{ steps.last_tag.outputs.add_on_last_tag }}", "addon_path": "tested-addon", "keepalive": false, "test_command": "${{ matrix.add_on.test_command }}" }'