Skip to content

Commit

Permalink
Unified Test runs in Docker (MiczFlor#2082)
Browse files Browse the repository at this point in the history
* removed obsolete v3.x workflow files

* set user and group as build args to test altuser

removed now obsolete "*_altuser" Dockerfile

* set GIT_BRANCH and GIT_URL as build args

makes sure that the installation script uses the current repo/branch

* use correct variables for refname resolving

* harmonized workflow and Dockerfiles

* optimize test docker performance. copy changed

only include the scripts that are needed.
Otherwise every code change will invalidate the container cache.
changed internal path of container and test scripts

* optimize test docker performance. refactored

changed thestructure to use the cache as much as possible.
repo url -> packages -> user -> scripts

* changed cache key

with ref instead of ref_name pull request will get a different cache

* get username with whoami

to be compatible with containers

* implemented different strategies for uniformity

* set noninteractive on debconf

get rid of warning "debconf: unable to initialize frontend: Dialog"
export DEBIAN_FRONTEND=noninteractive does not work with sudo

* unified workflow for debian. delete obsolete files

* fix branch name on pr

* refactored into subworkflow

* fixed apt-key deprecation

* unified Dockerfile. renamed workflow files

* fix repo name on pullrequest
  • Loading branch information
AlvinSchiller committed Dec 21, 2023
1 parent 4324da5 commit ddebd15
Show file tree
Hide file tree
Showing 20 changed files with 348 additions and 511 deletions.
66 changes: 0 additions & 66 deletions .github/workflows/docker_bullseye.yml

This file was deleted.

66 changes: 0 additions & 66 deletions .github/workflows/docker_bullseye_altuser.yml

This file was deleted.

66 changes: 0 additions & 66 deletions .github/workflows/docker_buster.yml

This file was deleted.

58 changes: 0 additions & 58 deletions .github/workflows/pythonpackage_future3.yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/test_docker_debian.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Test Install Scripts Debian

on:
schedule:
# run at 5:00 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 ]

# 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 }}-test-debian
cancel-in-progress: true

jobs:

# Build container and run tests
run:
name: ${{ matrix.debian_version_name }}
strategy:
fail-fast: false
matrix:
debian_version_name: ['bullseye', 'buster']
uses: ./.github/workflows/test_docker_debian_versionname_sub.yml
with:
runs_on: ubuntu-latest
platform: linux/arm/v7
docker_image_name: rpi-jukebox-rfid
cache_scope: ${{ github.ref }}-test-debian
matrix_usernames: "['pi', 'hans']"
matrix_test_scripts: "['run_installation_tests.sh', 'run_installation_tests2.sh', 'run_installation_tests3.sh']"
debian_version_name: ${{ matrix.debian_version_name }}
Loading

0 comments on commit ddebd15

Please sign in to comment.