diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3191904..9670496 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,7 +5,7 @@ on: branches: [ main ] schedule: - - cron: '25 08 * * *' + - cron: '25 08 * * *' workflow_dispatch: inputs: @@ -15,9 +15,13 @@ on: required: false default: false -# This is required for "gautamkrishnar/keepalive-workflow" +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +# This is required for "gautamkrishnar/keepalive-workflow", see "ddev/github-action-add-on-test" permissions: - contents: write + actions: write jobs: tests: @@ -29,7 +33,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: ddev/github-action-add-on-test@v1 + - uses: ddev/github-action-add-on-test@v2 with: ddev_version: ${{ matrix.ddev_version }} token: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 2d2885f..4945dcf 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,7 @@ For more information [check the documentation](https://docs.google.com/document/ ## Prerequisites: * [Install ddev](https://ddev.readthedocs.io/en/latest/users/install/ddev-installation/) if you haven't already. * Enable ddev on your local Drupal project. -* Ensure you can already run functional JavaScript tests in the ddev environment. This requires a working chromedriver container as part of your ddev installation. You can run any core functional javascript test without having Gander installed to confirm. - -For most use cases, this chrome image should work out of the box: -```ddev get ddev/ddev-selenium-standalone-chrome``` +* `ddev get ddev/ddev-selenium-standalone-chrome` to enable functional Javascript tests for DDEV. (`ddev/ddev-selenium-standalone-chrome` is a dependency of this add-on.) ## Getting started Add Gander and run Drupal's performance tests via a git clone of Drupal core (assuming [composer is @@ -31,6 +28,6 @@ used](https://www.drupal.org/docs/develop/using-composer/manage-dependencies)): * `ddev restart` * `ddev ssh` * `cd web/` -* To run a single test three times in order to check the Gander installation, ensure you're in the document root first: `for run in 1..3; do ../vendor/bin/phpunit -c core profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryNodePagePerformanceTest.php --filter hot; done;` -* To run all OpenTelemetry tests: `../vendor/bin/phpunit -c core --group OpenTelemetry` +* To run a single test three times in order to check the Gander installation, ensure you're in the document root first: `for run in 1..3; do phpunit -c core profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryNodePagePerformanceTest.php --filter hot; done;` +* To run all OpenTelemetry tests: `phpunit -c core --group OpenTelemetry` * Check the Grafana dashboard via: _http://\.ddev.site:3000/_ diff --git a/docker-compose.gander.yaml b/docker-compose.gander.yaml index 90f52a0..793999a 100644 --- a/docker-compose.gander.yaml +++ b/docker-compose.gander.yaml @@ -1,5 +1,4 @@ #ddev-generated -version: "3" services: # And put them in an OTEL collector pipeline... diff --git a/install.yaml b/install.yaml index d7bfe99..5eef8b6 100644 --- a/install.yaml +++ b/install.yaml @@ -2,6 +2,9 @@ name: ddev-gander +dependencies: + - ddev/ddev-selenium-standalone-chrome + # pre_install_actions - list of actions to run before installing the addon. # Examples would be removing an extraneous docker volume, # or doing a sanity check for requirements. diff --git a/tests/test.bats b/tests/test.bats index ca1f9cf..249bd17 100644 --- a/tests/test.bats +++ b/tests/test.bats @@ -8,6 +8,7 @@ setup() { ddev delete -Oy ${PROJNAME} >/dev/null 2>&1 || true cd "${TESTDIR}" ddev config --project-name=${PROJNAME} + ddev get ddev/ddev-selenium-standalone-chrome ddev start -y >/dev/null }