Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test #25

Closed
wants to merge 2 commits into from
Closed

test #25

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,23 @@ jobs:
tests:
strategy:
matrix:
ddev_version: [stable, HEAD]
ddev_version: [stable]
fail-fast: false

runs-on: ubuntu-latest

steps:
- uses: ddev/github-action-add-on-test@v2
- name: Check shell options before and after disabling history expansion
run: |
echo "Before set +H: $-"
set +H
echo "1After set +H: $-"

- uses: julienloizelet/ddev-add-on-test@b6b8c765ddba5fa511c2f9284e818d7fa3230f27
with:
ddev_version: ${{ matrix.ddev_version }}
token: ${{ secrets.GITHUB_TOKEN }}
debug_enabled: ${{ github.event.inputs.debug_enabled }}
addon_repository: ${{ env.GITHUB_REPOSITORY }}
addon_ref: ${{ env.GITHUB_REF }}
#test_command: "bats tests --filter-tags !release"
34 changes: 7 additions & 27 deletions tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,15 @@ teardown() {
grep -F 'settings.ddev.redis.php' web/sites/default/settings.php
}

@test "non-Drupal installation" {
ddev config --project-name=${PROJNAME} --project-type=laravel --docroot=web --create-docroot
ddev start -y
cd ${TESTDIR}
ddev get ${DIR}
ddev restart
ddev redis-cli INFO | grep "^redis_version:6."
# Drupal configuration should not be present
[ ! -f web/sites/default/settings.ddev.redis.php ]
}

@test "Drupal 7 installation" {
ddev config --project-name=${PROJNAME} --project-type=drupal7 --docroot=web --create-docroot
ddev start -y
cd ${TESTDIR}
ddev get ${DIR}
ddev restart
ddev redis-cli INFO | grep "^redis_version:6."
# Drupal configuration should not be present
[ ! -f web/sites/default/settings.ddev.redis.php ]
}

@test "Drupal 9 installation without settings management" {
ddev config --project-name=${PROJNAME} --disable-settings-management --project-type=drupal9 --docroot=web --create-docroot
# bats test_tags=release
@test "install from release" {
ddev config --project-name=${PROJNAME} --project-type=drupal9 --docroot=web --create-docroot
ddev start -y
cd ${TESTDIR}
ddev get ${DIR}
ddev get ddev/ddev-redis
ddev restart
ddev redis-cli INFO | grep "^redis_version:6."
# Drupal configuration should not be present
[ ! -f web/sites/default/settings.ddev.redis.php ]
# Check if Redis configuration was setup.
[ -f web/sites/default/settings.ddev.redis.php ]
grep -F 'settings.ddev.redis.php' web/sites/default/settings.php
}