Skip to content
Merged
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
4 changes: 4 additions & 0 deletions .github/scripts/update-checker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ check_tests_workflow() {
if (( paths_ignore_count < 2 )); then
actions+=("$tests_yml should contain at least 2 instances of 'paths-ignore:', found $paths_ignore_count, see upstream file $UPSTREAM/$tests_yml")
fi
# Check for an 'os:' matrix, which makes it easy to add more runners, for example to test arm64
if ! grep -q "matrix.os" "$tests_yml"; then
actions+=("$tests_yml should use an 'os:' matrix and 'runs-on: \${{ matrix.os }}', see upstream file $UPSTREAM/$tests_yml")
fi
}

# Check docker-compose.*.yaml files for 'build:' with 'image:' usage
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ jobs:
tests:
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm]
ddev_version: [stable, HEAD]
fail-fast: false

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

steps:
- uses: ddev/github-action-add-on-test@v2
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ curl -fsSL https://ddev.com/s/addon-update-checker.sh | bash

* In most cases, you only need to modify the `health_checks()` function and update the `GITHUB_REPO` variable to match your repository.
* Tests will run automatically on every push to the repository, and periodically each night.
* Tests run on both AMD64 and ARM64 runners by default. You can add or remove runners in `matrix.os` in [.github/workflows/tests.yml](.github/workflows/tests.yml), see [GitHub-hosted runners](https://docs.github.com/en/actions/reference/runners/github-hosted-runners).
* Please make sure to address test failures when they happen. Others will be depending on you.
* Bats is a testing framework that just uses Bash. To run a Bats test locally, you have to install [bats-core](https://bats-core.readthedocs.io/en/stable/installation.html) and its [libraries](https://github.com/ztombol/bats-docs) first.
* Then you download your add-on, and finally run `bats ./tests/test.bats` within the root of the uncompressed directory.
Expand Down