k3s/scripts/test
Derek Nola 7242ce9316
Redux: Add Unit Test Coverage to CI (#3524)
* Added Github action to run unit tests and connect to Codecov

Signed-off-by: dereknola <derek.nola@suse.com>
2021-06-29 11:27:50 -07:00

45 lines
678 B
Bash
Executable File

#!/bin/bash
set -e -x
cd $(dirname $0)/..
. ./scripts/codespell.sh
. ./scripts/version.sh
. ./scripts/test-helpers
artifacts=$(pwd)/dist/artifacts
mkdir -p $artifacts
# ---
docker ps
# ---
. ./scripts/test-run-basics
echo "Did test-run-basics $?"
. ./scripts/test-run-compat
echo "Did test-run-compat $?"
# ---
[ "$ARCH" != 'amd64' ] && \
early-exit "Skipping remaining tests, images not available for $ARCH."
E2E_OUTPUT=$artifacts test-run-sonobuoy
echo "Did test-run-sonobuoy $?"
# ---
[ "$DRONE_BUILD_EVENT" = 'tag' ] && \
early-exit 'Skipping remaining tests on tag.'
# ---
test-run-sonobuoy mysql
test-run-sonobuoy postgres
. ./scripts/test-unit
exit 0