Skip to content

Commit 45d824d

Browse files
committed
feat: add testing for DDEV HEAD
1 parent 657b133 commit 45d824d

File tree

2 files changed

+49
-8
lines changed

2 files changed

+49
-8
lines changed

.github/workflows/main.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ on:
99
paths-ignore:
1010
- "**.md"
1111
workflow_dispatch:
12+
inputs:
13+
debug_enabled:
14+
description: 'Run the build with tmate set "debug_enabled"'
15+
type: boolean
16+
required: false
17+
default: false
1218
schedule:
1319
- cron: 0 0 * * *
1420

@@ -19,30 +25,58 @@ jobs:
1925
fail-fast: false
2026
matrix:
2127
os: [ubuntu-24.04, ubuntu-24.04-arm]
22-
version: ['latest', '1.24.7']
28+
version: ['latest', 'head', '1.24.7']
2329
steps:
2430
- uses: actions/checkout@v5
2531
- uses: ./
2632
with:
2733
ddevDir: tests/fixtures/ddevProj1
2834
autostart: false
2935
version: ${{ matrix.version }}
36+
37+
- name: Setup tmate session
38+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
39+
uses: mxschmitt/action-tmate@v3
40+
with:
41+
limit-access-to-actor: true
42+
3043
- name: ddev version
3144
run: |
3245
if [[ ${{ matrix.version }} == '1.24.7' ]]; then
3346
test "$(ddev --version)" == 'ddev version v1.24.7'
3447
else
3548
test "$(ddev --version)" != 'ddev version v1.24.7'
3649
fi
50+
# running `ddev describe -j` in the next step downloads docker-compose in v1.24.9
51+
# and it breaks the output by having this extra line:
52+
# {"level":"info","msg":"Download complete.","time":"2025-11-04T14:16:55+02:00"}
53+
# Run `ddev version` here to download docker-compose earlier
54+
ddev version
55+
3756
- name: ddev stopped
3857
run: |
3958
cd tests/fixtures/ddevProj1
4059
test '"stopped"' = "$(ddev describe --json-output | jq '.raw.status')"
60+
4161
- name: start ddev
4262
run: |
4363
cd tests/fixtures/ddevProj1
4464
ddev start --json-output --skip-confirmation
65+
4566
- name: Mailpit reachable
4667
run: curl --silent --dump-header - --output /dev/null https://setup-ddev-proj1.ddev.site:8026
68+
4769
- name: "index.html: expected output"
4870
run: test 'index.html test output' = "$(curl --silent https://setup-ddev-proj1.ddev.site)"
71+
72+
- name: restart ddev with project_tld=test
73+
run: |
74+
cd tests/fixtures/ddevProj1
75+
ddev config --project-tld=test
76+
ddev restart --json-output --skip-confirmation
77+
78+
- name: Mailpit reachable
79+
run: curl --silent --dump-header - --output /dev/null https://setup-ddev-proj1.test:8026
80+
81+
- name: "index.html: expected output"
82+
run: test 'index.html test output' = "$(curl --silent https://setup-ddev-proj1.test)"

action.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,26 @@ runs:
2929
- name: Download DDEV install script
3030
shell: bash
3131
run: |
32-
curl -fsSL --retry 3 --retry-max-time 60 --retry-connrefused \
33-
-o /tmp/install_ddev.sh \
34-
"${{ inputs.installScriptUrl }}"
32+
if [[ '${{ inputs.version }}' == 'head' && '${{ inputs.installScriptUrl }}' == 'https://ddev.com/install.sh' ]]; then
33+
SCRIPT_URL="https://raw.githubusercontent.com/ddev/ddev/main/scripts/install_ddev_head.sh"
34+
echo "Using head version install script: ${SCRIPT_URL}"
35+
else
36+
SCRIPT_URL="${{ inputs.installScriptUrl }}"
37+
fi
38+
curl -fsSL --retry 3 --retry-max-time 60 --retry-connrefused -o /tmp/install_ddev.sh "${SCRIPT_URL}"
3539
3640
- name: Install DDEV
3741
shell: bash
3842
run: |
39-
if [[ '${{ inputs.version }}' != 'latest' ]]; then
43+
if [[ '${{ inputs.version }}' == 'latest' ]]; then
44+
VERSION_ARG=""
45+
echo "Installing latest stable DDEV version"
46+
elif [[ '${{ inputs.version }}' == 'head' ]]; then
47+
VERSION_ARG=""
48+
echo "Installing DDEV HEAD version"
49+
else
4050
VERSION_ARG="v${{ inputs.version }}"
4151
echo "Installing DDEV version: ${VERSION_ARG}"
42-
else
43-
VERSION_ARG=""
44-
echo "Installing latest DDEV version"
4552
fi
4653
4754
# Make installation script executable

0 commit comments

Comments
 (0)