tests #794
Workflow file for this run
This file contains hidden or 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-ignore: | |
| - "**.md" | |
| push: | |
| branches: [ main ] | |
| paths-ignore: | |
| - "**.md" | |
| workflow_dispatch: | |
| inputs: | |
| debug_enabled: | |
| description: 'Run the build with tmate set "debug_enabled"' | |
| type: boolean | |
| required: false | |
| default: false | |
| schedule: | |
| - cron: 0 0 * * * | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, ubuntu-24.04-arm] | |
| version: ['latest', 'head', '1.24.7'] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: ./ | |
| with: | |
| ddevDir: tests/fixtures/ddevProj1 | |
| autostart: false | |
| version: ${{ matrix.version }} | |
| - name: Setup tmate session | |
| if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
| uses: mxschmitt/action-tmate@v3 | |
| with: | |
| limit-access-to-actor: true | |
| - name: ddev version | |
| run: | | |
| if [[ ${{ matrix.version }} == '1.24.7' ]]; then | |
| test "$(ddev --version)" == 'ddev version v1.24.7' | |
| else | |
| test "$(ddev --version)" != 'ddev version v1.24.7' | |
| fi | |
| # running `ddev describe -j` in the next step downloads docker-compose in v1.24.9 | |
| # and it breaks the output by having this extra line: | |
| # {"level":"info","msg":"Download complete.","time":"2025-11-04T14:16:55+02:00"} | |
| # Run `ddev version` here to download docker-compose earlier | |
| ddev version | |
| - name: ddev stopped | |
| run: | | |
| cd tests/fixtures/ddevProj1 | |
| test '"stopped"' = "$(ddev describe --json-output | jq '.raw.status')" | |
| - name: start ddev | |
| run: | | |
| cd tests/fixtures/ddevProj1 | |
| ddev start --json-output --skip-confirmation | |
| - name: Mailpit reachable | |
| run: curl --silent --dump-header - --output /dev/null https://setup-ddev-proj1.ddev.site:8026 | |
| - name: "index.html: expected output" | |
| run: test 'index.html test output' = "$(curl --silent https://setup-ddev-proj1.ddev.site)" | |
| - name: restart ddev with project_tld=test | |
| run: | | |
| cd tests/fixtures/ddevProj1 | |
| ddev config --project-tld=test | |
| ddev restart --json-output --skip-confirmation | |
| - name: Mailpit reachable | |
| run: curl --silent --dump-header - --output /dev/null https://setup-ddev-proj1.test:8026 | |
| - name: "index.html: expected output" | |
| run: test 'index.html test output' = "$(curl --silent https://setup-ddev-proj1.test)" |