You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-08-08 22:46:33 +02:00
Move test script to workflows folder
This commit is contained in:
27
.github/workflows/test.sh
vendored
Executable file
27
.github/workflows/test.sh
vendored
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
# manually exiting from script, because after-build needs to run always
|
||||
set +e
|
||||
|
||||
if [ -z $CC_TEST_REPORTER_ID ]; then
|
||||
echo "1. CC_TEST_REPORTER_ID is unset, skipping"
|
||||
else
|
||||
echo "1. Running before-build"
|
||||
./cc-test-reporter before-build
|
||||
fi
|
||||
|
||||
echo "2. Running test"
|
||||
make test
|
||||
TEST_STATUS=$?
|
||||
echo "TEST_STATUS: ${TEST_STATUS}"
|
||||
|
||||
if [ -z $CC_TEST_REPORTER_ID ]; then
|
||||
echo "3. CC_TEST_REPORTER_ID is unset, skipping"
|
||||
else
|
||||
echo "3. Running after-build"
|
||||
./cc-test-reporter after-build --exit-code $TEST_STATUS -t gocov
|
||||
fi
|
||||
|
||||
if [ "$TEST_STATUS" -ne 0 ]; then
|
||||
echo "Test failed, status code: $TEST_STATUS"
|
||||
exit $TEST_STATUS
|
||||
fi
|
Reference in New Issue
Block a user