concurrency korrigiert #9
Workflow file for this run
This file contains 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: Test Install Scripts Target Unified | |
# let only one instance run the test so cache is not corrupted. | |
# cancel already running instances as only the last run will be relevant | |
concurrency: | |
group: ${{ github.ref }}-target-unified | |
cancel-in-progress: true | |
on: | |
# schedule: | |
# # run at 5 every sunday | |
# - cron: '0 5 * * 0' | |
push: | |
branches-ignore: | |
- 'future3/**' | |
# pull_request: | |
# # The branches below must be a subset of the branches above | |
# branches: [ develop ] | |
workflow_dispatch: | |
env: | |
DOCKER_IMAGE_NAME: rpi-jukebox-rfid-bullseye | |
CACHE_SCOPE: ${{ github.ref_name }}-target-unified | |
jobs: | |
prepare: | |
name: Prepare base image for tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/[email protected] | |
- name: Set up Docker Buildx | |
uses: docker/[email protected] | |
- name: Build Bullseye ARMv7 | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
load: true | |
push: false | |
file: ./ci/Dockerfile.bullseye.test_target_unified_install.armv7 | |
target: user | |
platforms: linux/arm/v7 | |
tags: local/${{ env.DOCKER_IMAGE_NAME }}-user:cache | |
cache-from: type=gha,scope=${{ env.CACHE_SCOPE }} | |
cache-to: type=gha,mode=max,scope=${{ env.CACHE_SCOPE }} | |
test: | |
needs: prepare | |
name: Run tests | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
test_Script: [run_installation_tests.sh, run_installation_tests2.sh, run_installation_tests3.sh] | |
username: [pi, hans] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/[email protected] | |
- name: Set up Docker Buildx | |
uses: docker/[email protected] | |
- name: Build Bullseye ARMv7 | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
load: true | |
push: false | |
file: ./ci/Dockerfile.bullseye.test_target_unified_install.armv7 | |
target: test | |
platforms: linux/arm/v7 | |
tags: local/${{ env.DOCKER_IMAGE_NAME }}-test:cache | |
cache-from: type=gha,scope=${{ env.CACHE_SCOPE }} | |
build-args: | | |
GIT_BRANCH=${{ github.ref_name }} | |
GIT_URL=${{ github.server_url }}/${{ github.repository }} | |
- name: Run ${{ matrix.test_Script }} Bullseye ARMv7 | |
uses: tj-actions/docker-run@v2 | |
with: | |
image: local/${{ env.DOCKER_IMAGE_NAME }}-test:cache | |
options: --platform linux/arm/v7 --user ${{ matrix.username }} | |
name: ${{ matrix.test_Script }} | |
args: | | |
./${{ matrix.test_Script }} |