From afba30fa0b6f45a1cdd1e8c27dc9e7122ee3e9c2 Mon Sep 17 00:00:00 2001 From: sidey79 <7968127+sidey79@users.noreply.github.com> Date: Thu, 26 Dec 2024 22:50:56 +0100 Subject: [PATCH] feat[Build] Added target to build steps and added integrationtests --- .github/actions/integrationtest/action.yml | 1 + .github/workflows/build.yml | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/.github/actions/integrationtest/action.yml b/.github/actions/integrationtest/action.yml index 0ff6bae..5765a5a 100644 --- a/.github/actions/integrationtest/action.yml +++ b/.github/actions/integrationtest/action.yml @@ -32,6 +32,7 @@ runs: load: true tags: ${{ steps.meta-runtime.outputs.tags }} labels: ${{ steps.meta-runtime.outputs.labels }} + target: alexa-fhem cache-from: | type=gha,scope=verify_runtime_${{ inputs.PLATTFORM }} cache-to: type=gha,mode=max,scope=verify_runtime_${{ inputs.PLATTFORM }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9202d3a..2c5a3bb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,6 +39,25 @@ jobs: PLATTFORM: linux/amd64 ALEXAFHEM_VERSION: ${{ steps.split_alexafhemV.outputs.result }} + - name: Build for bats with fhem base layer + uses: docker/build-push-action@v6.9.0 + id: docker_build_bats + with: + context: . + load: true + file: ./Dockerfile + platforms: linux/amd64 + push: false + target: alexa-fhem-bats + cache-from: | + type=gha,scope=verify_runtime_linux/amd64 + tags: bats-withalexafhem + + - uses: Wandalen/wretry.action@v3.7.3 + name: Run bats unit and integration tests in bidge network mode + with: + attempt_limit: 3 + command: timeout 9m docker run --rm -e GITHUB_RUN_ID=$GITHUB_RUN_ID -v "${PWD}/src/tests/bats:/code" bats-withalexafhem:latest -T -t . published_build: runs-on: ubuntu-latest needs: test_build @@ -134,6 +153,8 @@ jobs: L_USAGE=${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/README.md L_VCS_URL=${{ github.server_url }}/${{ github.repository }}/ L_AUTHORS=${{ github.server_url }}/${{ github.repository }}/graphs/contributors + target: alexa-fhem + - name: Install cosign uses: sigstore/cosign-installer@v3.7.0