Skip to content

Commit

Permalink
Test Matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvinSchiller committed Oct 14, 2023
1 parent 79f6c44 commit 4f86f90
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 54 deletions.
76 changes: 49 additions & 27 deletions .github/workflows/docker_bullseye.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ on:
# The branches below must be a subset of the branches above
branches: [ develop ]

env:
DOCKER_IMAGE_NAME: rpi-jukebox-rfid-bullseye

jobs:

build:
prepare:

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v4

- name: Set up QEMU
Expand All @@ -34,36 +38,54 @@ jobs:
push: false
file: ./ci/Dockerfile.bullseye.test_install.armv7
platforms: linux/arm/v7
tags: rpi-jukebox-rfid-bullseye:latest
cache-from: type=gha,scope=${{ github.ref_name }}-bullseye
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-bullseye
tags: ${{ env.DOCKER_IMAGE_NAME }}:latest
cache-from: type=gha,scope=${{ github.ref_name }}
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}
outputs: type=docker,dest=/tmp/${{ env.DOCKER_IMAGE_NAME }}.tar
build-args: |
GIT_BRANCH=${{ github.ref_name }}
GIT_URL=${{ github.server_url }}/${{ github.repository }}
- name: Run run_installation_tests.sh Bullseye ARMv7
uses: tj-actions/docker-run@v2
- name: Upload Docker Build Image
uses: actions/upload-artifact@v3
with:
image: rpi-jukebox-rfid-bullseye:latest
options: --platform linux/arm/v7
name: run_installation_tests.sh
args: |
./run_installation_tests.sh
- name: Run run_installation_tests2.sh Bullseye ARMv7
uses: tj-actions/docker-run@v2
name: ${{ env.DOCKER_IMAGE_NAME }}.tar
path: /tmp/${{ env.DOCKER_IMAGE_NAME }}.tar

test:

needs: prepare

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
test_Script: [run_installation_tests.sh, run_installation_tests2.sh, run_installation_tests3.sh]

steps:

- name: Set up QEMU
uses: docker/[email protected]

- name: Set up Docker Buildx
uses: docker/[email protected]

- name: Download Docker Build Image
uses: actions/download-artifact@v3
with:
image: rpi-jukebox-rfid-bullseye:latest
options: --platform linux/arm/v7
name: run_installation_tests2.sh
args: |
./run_installation_tests2.sh
- name: Run run_installation_tests3.sh Bullseye ARMv7
name: ${{ env.DOCKER_IMAGE_NAME }}.tar
path: /tmp/

- name: Load Docker Build Image
run: |
docker load --input /tmp/${{ env.DOCKER_IMAGE_NAME }}.tar
- name: Run ${{ matrix.test_Script }} Bullseye ARMv7
uses: tj-actions/docker-run@v2
with:
image: rpi-jukebox-rfid-bullseye:latest
image: ${{ env.DOCKER_IMAGE_NAME }}:latest
options: --platform linux/arm/v7
name: run_installation_tests3.sh
name: ${{ matrix.test_Script }}
args: |
./run_installation_tests3.sh
./${{ matrix.test_Script }}
76 changes: 49 additions & 27 deletions .github/workflows/docker_bullseye_altuser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ on:
# The branches below must be a subset of the branches above
branches: [ develop ]

env:
DOCKER_IMAGE_NAME: rpi-jukebox-rfid-bullseye-altuser

jobs:

build:
prepare:

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v4

- name: Set up QEMU
Expand All @@ -34,38 +38,56 @@ jobs:
push: false
file: ./ci/Dockerfile.bullseye.test_install.armv7
platforms: linux/arm/v7
tags: rpi-jukebox-rfid-bullseye-altuser:latest
cache-from: type=gha,scope=${{ github.ref_name }}-bullseye-altuser
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-bullseye-altuser
tags: ${{ env.DOCKER_IMAGE_NAME }}:latest
cache-from: type=gha,scope=${{ github.ref_name }}
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}
outputs: type=docker,dest=/tmp/${{ env.DOCKER_IMAGE_NAME }}.tar
build-args: |
USER_NAME=hans
USER_GROUP=wurst
GIT_BRANCH=${{ github.ref_name }}
GIT_URL=${{ github.server_url }}/${{ github.repository }}
- name: Run run_installation_tests.sh Bullseye ARMv7
uses: tj-actions/docker-run@v2
- name: Upload Docker Build Image
uses: actions/upload-artifact@v3
with:
image: rpi-jukebox-rfid-bullseye-altuser:latest
options: --platform linux/arm/v7
name: run_installation_tests.sh
args: |
./run_installation_tests.sh
- name: Run run_installation_tests2.sh Bullseye ARMv7
uses: tj-actions/docker-run@v2
name: ${{ env.DOCKER_IMAGE_NAME }}.tar
path: /tmp/${{ env.DOCKER_IMAGE_NAME }}.tar

test:

needs: prepare

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
test_Script: [run_installation_tests.sh, run_installation_tests2.sh, run_installation_tests3.sh]

steps:

- name: Set up QEMU
uses: docker/[email protected]

- name: Set up Docker Buildx
uses: docker/[email protected]

- name: Download Docker Build Image
uses: actions/download-artifact@v3
with:
image: rpi-jukebox-rfid-bullseye-altuser:latest
options: --platform linux/arm/v7
name: run_installation_tests2.sh
args: |
./run_installation_tests2.sh
- name: Run run_installation_tests3.sh Bullseye ARMv7
name: ${{ env.DOCKER_IMAGE_NAME }}.tar
path: /tmp/

- name: Load Docker Build Image
run: |
docker load --input /tmp/${{ env.DOCKER_IMAGE_NAME }}.tar
- name: Run ${{ matrix.test_Script }} Bullseye ARMv7
uses: tj-actions/docker-run@v2
with:
image: rpi-jukebox-rfid-bullseye-altuser:latest
image: ${{ env.DOCKER_IMAGE_NAME }}:latest
options: --platform linux/arm/v7
name: run_installation_tests3.sh
name: ${{ matrix.test_Script }}
args: |
./run_installation_tests3.sh
./${{ matrix.test_Script }}

0 comments on commit 4f86f90

Please sign in to comment.