Skip to content
Snippets Groups Projects
Verified Commit 5172c0e4 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: cleanup script

parent 993d1d26
Branches
No related tags found
No related merge requests found
......@@ -55,7 +55,7 @@ deploy:
script:
- nix develop --command deploy
after_script:
- nix develop --command cleanup
- nix develop --command clean-up
when: on_success
......
......@@ -5,8 +5,12 @@
</component>
<component name="ChangeListManager">
<list default="true" id="9979eb22-471e-4f2f-b624-fd3edb5e8c6e" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.gitlab-ci.yml" beforeDir="false" afterPath="$PROJECT_DIR$/.gitlab-ci.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/nix/scripts/run-ci-tests.nix" beforeDir="false" afterPath="$PROJECT_DIR$/nix/scripts/run-ci-tests.nix" afterDir="false" />
<change beforePath="$PROJECT_DIR$/flake.nix" beforeDir="false" afterPath="$PROJECT_DIR$/flake.nix" afterDir="false" />
<change beforePath="$PROJECT_DIR$/nix/scripts/cleanup.nix" beforeDir="false" afterPath="$PROJECT_DIR$/nix/scripts/clean-up.nix" afterDir="false" />
<change beforePath="$PROJECT_DIR$/nix/scripts/go-task.nix" beforeDir="false" afterPath="$PROJECT_DIR$/nix/scripts/go-task.nix" afterDir="false" />
<change beforePath="$PROJECT_DIR$/nix/scripts/run-extended-tests.nix" beforeDir="false" afterPath="$PROJECT_DIR$/nix/scripts/run-extended-tests.nix" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......
......@@ -24,6 +24,9 @@
script-check-code = pkgs'.callPackage ./nix/scripts/check-code.nix {};
script-build-cover-report = pkgs'.callPackage ./nix/scripts/build-cover-report.nix {};
script-clean-up = pkgs'.callPackage ./nix/scripts/clean-up.nix {};
script-deploy = pkgs'.callPackage ./nix/scripts/deploy.nix {};
import-version = version.packages.${system}.version;
in {
devShells = {
......@@ -39,6 +42,9 @@
script-build-cover-report
script-task
script-clean-up
script-deploy
import-version
alejandra
......
......@@ -10,7 +10,10 @@ in
echo_header "Cleaning up"
echo_step "Removing credentials"
${pkgs.git}/bin/git config --global --unset credential.helper
if [ -f /root/.docker/config.json ]; then rm /root/.docker/config.json; fi
echo_ok "Cleaned up"
''
......@@ -24,6 +24,7 @@
- ret
env:
TEST_BY_TASK: true
USER_WORKING_DIR: "{{.USER_WORKING_DIR}}"
cmds:
- run-extended-tests
silent: true
......
......@@ -9,32 +9,45 @@ in
${common}
echo_header "Running tests"
echo_step "Downloading docker images"
echo_header "Running extended tests"
download_test_images
setup_go_env
cd_working_dir
echo_section "Running tests"
echo_step "Running tests"
if ! ${pkgs.go}/bin/go test -tags "runOnTask" -cover ./...
then
echo_fail "Failed to run tests"
exit 1
fi
echo_ok "All tests passed"
echo_section "Running tests"
echo_step "Running benchmarks"
if ! ${pkgs.go}/bin/go test -tags "runOnTask,bench" -bench ./...
then
echo_fail "Failed to run benchmarks"
exit 1
fi
echo_ok "Benchmarks passed"
echo_section "Running tests"
echo_step "Running race tests"
if ! ${pkgs.go}/bin/go test -tags "runOnTask,race" -race ./...
then
echo_fail "Failed to run race tests"
exit 1
fi
echo_ok "race tests passed"
echo_step "Running fuzz tests"
if ! ${pkgs.go}/bin/go test -tags "runOnTask,fuzz" -fuzz ./...
then
echo_fail "Failed to run fuzz tests"
exit 1
fi
echo_ok "Fuzz tests passed"
echo_ok "All tests passed"
''
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment