Add support for zigbee2MQTT v2.x #1497
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: BATS | |
| on: | |
| push: | |
| paths: | |
| - 'tests/Dockerfile.*-BATS' | |
| - 'functions/*.bats' | |
| - 'functions/habapp.bash' | |
| - 'functions/helpers.bash' | |
| - 'functions/influxdb+grafana.bash' | |
| - 'functions/java-jre.bash' | |
| - 'functions/nodejs-apps.bash' | |
| - 'functions/packages.bash' | |
| - 'functions/vpn.bash' | |
| - 'functions/zram.bash' | |
| - '.github/workflows/bats-action.yml' | |
| pull_request: | |
| paths: | |
| - 'tests/Dockerfile.*-BATS' | |
| - 'functions/*.bats' | |
| - 'functions/habapp.bash' | |
| - 'functions/helpers.bash' | |
| - 'functions/influxdb+grafana.bash' | |
| - 'functions/java-jre.bash' | |
| - 'functions/nodejs-apps.bash' | |
| - 'functions/packages.bash' | |
| - 'functions/vpn.bash' | |
| - 'functions/zram.bash' | |
| - '.github/workflows/bats-action.yml' | |
| jobs: | |
| bats-tests: | |
| name: ${{ matrix.platform }} BATS | |
| runs-on: ${{ matrix.runner }} | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
| strategy: | |
| matrix: | |
| include: | |
| - platform: amd64 | |
| runner: ubuntu-24.04 | |
| dockerfile: ./tests/Dockerfile.amd64-BATS | |
| - platform: rpi4 | |
| runner: ubuntu-24.04-arm | |
| dockerfile: ./tests/Dockerfile.rpi4-BATS | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Setup environment | |
| run: sudo -E ./tests/ci-setup.bash github | |
| - name: Set up Docker Buildx | |
| id: buildx | |
| uses: docker/setup-buildx-action@v3.11.1 | |
| with: | |
| driver-opts: network=host | |
| - name: Build Docker image | |
| uses: docker/build-push-action@v6.18.0 | |
| with: | |
| context: . | |
| file: ${{ matrix.dockerfile }} | |
| builder: ${{ steps.buildx.outputs.name }} | |
| tags: openhabian/${{ matrix.platform }}-openhabian:latest | |
| load: true | |
| - name: BATS tests on ${{ matrix.platform }} platform | |
| run: | | |
| docker run --rm --name "openhabian-${{ matrix.platform }}" -d openhabian/${{ matrix.platform }}-openhabian | |
| docker exec -i "openhabian-${{ matrix.platform }}" bash -c 'bats --tap --recursive --filter "development-." .' | |
| docker exec -i "openhabian-${{ matrix.platform }}" bash -c 'bats --tap --recursive --filter "unit-." .' | |
| docker exec -i "openhabian-${{ matrix.platform }}" bash -c 'bats --tap --recursive --filter "installation-." .' | |
| docker exec -i "openhabian-${{ matrix.platform }}" bash -c 'bats --tap --recursive --filter "destructive-." .' | |
| docker stop "openhabian-${{ matrix.platform }}" |