diff --git a/.github/scripts/update-checker.sh b/.github/scripts/update-checker.sh index 5169b09..2e8c912 100755 --- a/.github/scripts/update-checker.sh +++ b/.github/scripts/update-checker.sh @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d3c308b..e86aa85 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 diff --git a/README.md b/README.md index 67ef2c2..d03a067 100644 --- a/README.md +++ b/README.md @@ -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.