Skip to content

Commit 59d9ab3

Browse files
authored
test: update bats to use ddev add-on get (#108)
1 parent 6866dc3 commit 59d9ab3

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

.github/workflows/tests.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ on:
1515
required: false
1616
default: false
1717

18-
env:
19-
# Allow ddev get to use a github token to prevent rate limiting by tests
20-
DDEV_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: true
2121

22-
# Required permissions for keep-alive, used by ddev/github-action-add-on-test
22+
# This is required for "gautamkrishnar/keepalive-workflow", see "ddev/github-action-add-on-test"
2323
permissions:
2424
actions: write
2525

@@ -34,16 +34,16 @@ jobs:
3434
runs-on: ubuntu-latest
3535

3636
steps:
37-
- uses: actions/checkout@v4
38-
with:
39-
submodules: true
40-
41-
- uses: ddev/github-action-add-on-test@v2
42-
with:
43-
disable_checkout_action: true
44-
ddev_version: ${{ matrix.ddev_version }}
45-
token: ${{ secrets.GITHUB_TOKEN }}
46-
debug_enabled: ${{ github.event.inputs.debug_enabled }}
47-
addon_repository: ${{ env.GITHUB_REPOSITORY }}
48-
addon_ref: ${{ env.GITHUB_REF }}
49-
test_command: eval TEST_DRUPAL_CORE=${{ matrix.drupal_version }} ./tests/bats/bin/bats tests
37+
- uses: actions/checkout@v4
38+
with:
39+
submodules: true
40+
41+
- uses: ddev/github-action-add-on-test@v2
42+
with:
43+
disable_checkout_action: true
44+
ddev_version: ${{ matrix.ddev_version }}
45+
token: ${{ secrets.GITHUB_TOKEN }}
46+
debug_enabled: ${{ github.event.inputs.debug_enabled }}
47+
addon_repository: ${{ env.GITHUB_REPOSITORY }}
48+
addon_ref: ${{ env.GITHUB_REF }}
49+
test_command: eval TEST_DRUPAL_CORE=${{ matrix.drupal_version }} ./tests/bats/bin/bats tests

tests/_common.bash

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ _common_setup() {
66
export PROJNAME=test-drupal-contrib
77
export TESTDIR=~/tmp/${PROJNAME}
88
mkdir -p $TESTDIR
9-
export DDEV_NON_INTERACTIVE=true
9+
export DDEV_NONINTERACTIVE=true
10+
export DDEV_NO_INSTRUMENTATION=true
1011
ddev delete -Oy ${PROJNAME} >/dev/null 2>&1 || true
1112
cp -R ${DIR}/tests/testdata/test_drupal_contrib/* ${TESTDIR}
1213
cd ${TESTDIR}
1314
ddev config --project-name=${PROJNAME} --project-type=drupal --docroot=web --php-version=8.3 --corepack-enable
1415
if [ -n "$TEST_DRUPAL_CORE" ] && [ "$TEST_DRUPAL_CORE" != "default" ]; then
1516
echo -e "web_environment:\n - DRUPAL_CORE=^${TEST_DRUPAL_CORE}" > .ddev/config.~overrides.yaml
1617
fi
17-
ddev get ${DIR}
18+
ddev add-on get ${DIR}
1819
}
1920

2021
_common_teardown() {

0 commit comments

Comments
 (0)