docs: standardize capitalization #818
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
pull_request: | |
paths: | |
- "go.*" | |
- "pkg/**" | |
- "cmd/**" | |
- "Makefile" | |
- "vendor/**" | |
- ".github/workflows/**" | |
push: | |
branches: [ master, main ] | |
schedule: | |
- cron: '01 00 * * *' | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
description: 'Run the build with tmate set "debug_enabled"' | |
type: boolean | |
required: false | |
default: false | |
defaults: | |
run: | |
shell: bash | |
env: | |
BUILDKIT_PROGRESS: plain | |
DOCKER_CLI_EXPERIMENTAL: enabled | |
DDEV_DEBUG: true | |
DDEV_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
permissions: | |
contents: read | |
jobs: | |
tests: | |
strategy: | |
matrix: | |
include: | |
- name: "apache-fpm" | |
webserver: "apache-fpm" | |
- name: "nginx-fpm" | |
webserver: "nginx-fpm" | |
- name: "mutagen" | |
mutagen: true | |
# - name: "no-bind-mounts" | |
# no-bind-mounts: "true" | |
- name: "nginx-proxy" | |
router: "nginx-proxy" | |
- name: "pull-push-test-platforms" | |
pull-push-test-platforms: true | |
fail-fast: false | |
runs-on: ubuntu-22.04 | |
env: | |
DDEV_NONINTERACTIVE: "true" | |
GOTEST_SHORT: "12" # 8 is drupal10; means in TestFullSiteSetup we only use drupal10 | |
DDEV_TEST_WEBSERVER_TYPE: ${{ matrix.webserver }} | |
DDEV_TEST_USE_MUTAGEN: ${{ matrix.mutagen }} | |
DDEV_TEST_NO_BIND_MOUNTS: ${{ matrix.no-bind-mounts }} | |
DDEV_TEST_USE_NGINX_PROXY_ROUTER: ${{ matrix.nginx-proxy-router }} | |
MAKE_TARGET: "test" | |
TESTARGS: "-failfast" | |
DDEV_ACQUIA_SSH_KEY: ${{ secrets.DDEV_ACQUIA_SSH_KEY }} | |
DDEV_PANTHEON_SSH_KEY: ${{ secrets.DDEV_PANTHEON_SSH_KEY }} | |
DDEV_SKIP_NODEJS_TEST: "true" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get Date | |
id: get-date | |
run: | | |
echo "date=$(/bin/date -u "+%Y%V")" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: DDEV test cache | |
uses: actions/cache@v4 | |
if: github.ref == 'refs/heads/master' && matrix.name == 'pull-push-test-platforms' | |
with: | |
path: ~/.ddev/testcache/tarballs | |
key: ddev-test-cache-${{ steps.get-date.outputs.date }} | |
restore-keys: | | |
ddev-test-cache- | |
- name: DDEV test cache/restore | |
uses: actions/cache/restore@v4 | |
if: github.ref != 'refs/heads/master' || matrix.name != 'pull-push-test-platforms' | |
with: | |
path: ~/.ddev/testcache/tarballs | |
key: ddev-test-cache-${{ steps.get-date.outputs.date }} | |
restore-keys: | | |
ddev-test-cache- | |
- name: Set up Homebrew | |
id: set-up-homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
- name: Get Homebrew Cache Directory | |
id: homebrew-cache | |
run: | | |
echo "dir=$(brew --cache)" >> $GITHUB_OUTPUT | |
- name: Homebrew cache | |
uses: actions/cache@v4 | |
if: github.ref == 'refs/heads/master' | |
with: | |
path: ${{ steps.homebrew-cache.outputs.dir }} | |
key: ${{ runner.os }}-homebrew-cache-${{ steps.get-date.outputs.date }} | |
restore-keys: | | |
${{ runner.os }}-homebrew-cache- | |
- name: Homebrew cache/restore | |
uses: actions/cache/restore@v4 | |
if: github.ref != 'refs/heads/master' | |
with: | |
path: ${{ steps.homebrew-cache.outputs.dir }} | |
key: ${{ runner.os }}-homebrew-cache-${{ steps.get-date.outputs.date }} | |
restore-keys: | | |
${{ runner.os }}-homebrew-cache- | |
- name: Remove unnecessary items on disk | |
run: sudo rm -rf /usr/local/lib/android && df -h . | |
- name: Install Docker and deps (Linux) | |
run: ./.github/workflows/linux-setup.sh | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '>=1.21' | |
- name: Override environment variables for push-pull-test-platforms | |
run: | | |
echo "MAKE_TARGET=test" >> $GITHUB_ENV | |
echo "TESTARGS=-failfast -run '(TestDdevFullSite.*|TestDdevImportFiles|TestDdevAllDatabases|TestComposerCreateCmd|Test.*(Push|Pull))'" >> $GITHUB_ENV | |
echo "GOTEST_SHORT=" >> $GITHUB_ENV | |
echo "DDEV_PLATFORM_API_TOKEN=${{ secrets.DDEV_PLATFORM_API_TOKEN }}" >> $GITHUB_ENV | |
echo "DDEV_UPSUN_API_TOKEN=${{ secrets.DDEV_UPSUN_API_TOKEN }}" >> $GITHUB_ENV | |
echo "DDEV_PANTHEON_API_TOKEN=${{ secrets.DDEV_PANTHEON_API_TOKEN }}" >> $GITHUB_ENV | |
echo "DDEV_ALLOW_ACQUIA_PUSH=${{ secrets.DDEV_ALLOW_ACQUIA_PUSH }}" >> $GITHUB_ENV | |
echo "DDEV_ACQUIA_API_KEY=${{ secrets.DDEV_ACQUIA_API_KEY }}" >> $GITHUB_ENV | |
echo "DDEV_ACQUIA_API_SECRET=${{ secrets.DDEV_ACQUIA_API_SECRET }}" >> $GITHUB_ENV | |
echo "DDEV_LAGOON_SSH_KEY=${{ secrets.DDEV_LAGOON_SSH_KEY }}" >> $GITHUB_ENV | |
if: ${{ matrix.pull-push-test-platforms }} | |
- name: Override environment variables for plain nginx | |
run: | | |
echo "DDEV_SKIP_NODEJS_TEST=false" >> $GITHUB_ENV | |
if: ${{ matrix.webserver == 'nginx-fpm' }} | |
- run: echo "DDEV_TEST_USE_MUTAGEN=${DDEV_TEST_USE_MUTAGEN} DDEV_TEST_USE_NGINX_PROXY_ROUTER=${DDEV_TEST_USE_NGINX_PROXY_ROUTER} DDEV_TEST_WEBSERVER_TYPE=${DDEV_TEST_WEBSERVER_TYPE} DDEV_TEST_NO_BIND_MOUNTS=${DDEV_TEST_NO_BIND_MOUNTS} MAKE_TARGET=${MAKE_TARGET} TESTARGS=${TESTARGS} GOTEST_SHORT='${GOTEST_SHORT}'" | |
- name: Setup tmate session | |
uses: mxschmitt/action-tmate@v3 | |
with: | |
limit-access-to-actor: true | |
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
- name: DDEV tests | |
run: make TESTARGS="${TESTARGS}" ${MAKE_TARGET} | |
- name: Clean up Homebrew | |
continue-on-error: true | |
run: | | |
brew update | |
brew autoremove | |
brew cleanup |