Skip initializer tests for pre-releases
This commit is contained in:
parent
e62fedbd5e
commit
ec35446b65
2 changed files with 16 additions and 1 deletions
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
@ -43,6 +43,10 @@ jobs:
|
||||||
- id: docker-build
|
- id: docker-build
|
||||||
name: Build the image with '${{ matrix.build_cmd }}'
|
name: Build the image with '${{ matrix.build_cmd }}'
|
||||||
run: ${{ matrix.build_cmd }}
|
run: ${{ matrix.build_cmd }}
|
||||||
|
- id: test-configuration
|
||||||
|
name: Set ENV variable to skip initializer tests for prereleases
|
||||||
|
if: ${{ contains(matrix.build_cmd, 'PRERELEASE=true') || contains(matrix.build_cmd, 'feature') }}
|
||||||
|
run: echo "SKIP_INITIALIZER_TESTS=true" >>"${GITHUB_ENV}"
|
||||||
- id: test-image
|
- id: test-image
|
||||||
name: Test the image
|
name: Test the image
|
||||||
run: IMAGE="${FINAL_DOCKER_TAG}" ./test.sh
|
run: IMAGE="${FINAL_DOCKER_TAG}" ./test.sh
|
||||||
|
|
11
test.sh
11
test.sh
|
@ -14,6 +14,8 @@
|
||||||
# exit when a command exits with an exit code != 0
|
# exit when a command exits with an exit code != 0
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
source ./build-functions/gh-functions.sh
|
||||||
|
|
||||||
# IMAGE is used by `docker-compose.yml` do determine the tag
|
# IMAGE is used by `docker-compose.yml` do determine the tag
|
||||||
# of the Docker Image that is to be used
|
# of the Docker Image that is to be used
|
||||||
if [ "${1}x" != "x" ]; then
|
if [ "${1}x" != "x" ]; then
|
||||||
|
@ -80,7 +82,16 @@ echo "🐳🐳🐳 Start testing '${IMAGE}'"
|
||||||
trap test_cleanup EXIT ERR
|
trap test_cleanup EXIT ERR
|
||||||
test_setup
|
test_setup
|
||||||
|
|
||||||
|
gh_echo "::group::Netbox unit tests"
|
||||||
test_netbox_unit_tests
|
test_netbox_unit_tests
|
||||||
|
gh_echo "::endgroup::"
|
||||||
|
|
||||||
|
gh_echo "::group::Innitializer tests"
|
||||||
|
if [ "$SKIP_INITIALIZER_TESTS" == "true" ]; then
|
||||||
|
echo "↩️ Skipping initializer tests"
|
||||||
|
else
|
||||||
test_initializers
|
test_initializers
|
||||||
|
fi
|
||||||
|
gh_echo "::endgroup::"
|
||||||
|
|
||||||
echo "🐳🐳🐳 Done testing '${IMAGE}'"
|
echo "🐳🐳🐳 Done testing '${IMAGE}'"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue