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
No related branches found
No related tags found
No related merge requests found
...@@ -55,7 +55,7 @@ deploy: ...@@ -55,7 +55,7 @@ deploy:
script: script:
- nix develop --command deploy - nix develop --command deploy
after_script: after_script:
- nix develop --command cleanup - nix develop --command clean-up
when: on_success when: on_success
......
...@@ -5,8 +5,12 @@ ...@@ -5,8 +5,12 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="9979eb22-471e-4f2f-b624-fd3edb5e8c6e" name="Changes" comment=""> <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$/.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> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
......
...@@ -24,6 +24,9 @@ ...@@ -24,6 +24,9 @@
script-check-code = pkgs'.callPackage ./nix/scripts/check-code.nix {}; script-check-code = pkgs'.callPackage ./nix/scripts/check-code.nix {};
script-build-cover-report = pkgs'.callPackage ./nix/scripts/build-cover-report.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; import-version = version.packages.${system}.version;
in { in {
devShells = { devShells = {
...@@ -39,6 +42,9 @@ ...@@ -39,6 +42,9 @@
script-build-cover-report script-build-cover-report
script-task script-task
script-clean-up
script-deploy
import-version import-version
alejandra alejandra
......
...@@ -10,7 +10,10 @@ in ...@@ -10,7 +10,10 @@ in
echo_header "Cleaning up" echo_header "Cleaning up"
echo_step "Removing credentials"
${pkgs.git}/bin/git config --global --unset credential.helper ${pkgs.git}/bin/git config --global --unset credential.helper
if [ -f /root/.docker/config.json ]; then rm /root/.docker/config.json; fi if [ -f /root/.docker/config.json ]; then rm /root/.docker/config.json; fi
echo_ok "Cleaned up"
'' ''
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
- ret - ret
env: env:
TEST_BY_TASK: true TEST_BY_TASK: true
USER_WORKING_DIR: "{{.USER_WORKING_DIR}}"
cmds: cmds:
- run-extended-tests - run-extended-tests
silent: true silent: true
......
...@@ -9,32 +9,45 @@ in ...@@ -9,32 +9,45 @@ in
${common} ${common}
echo_header "Running tests" echo_header "Running extended tests"
echo_step "Downloading docker images"
download_test_images download_test_images
setup_go_env setup_go_env
cd_working_dir
echo_section "Running tests" echo_step "Running tests"
if ! ${pkgs.go}/bin/go test -tags "runOnTask" -cover ./... if ! ${pkgs.go}/bin/go test -tags "runOnTask" -cover ./...
then then
echo_fail "Failed to run tests" echo_fail "Failed to run tests"
exit 1 exit 1
fi fi
echo_ok "All tests passed"
echo_section "Running tests" echo_step "Running benchmarks"
if ! ${pkgs.go}/bin/go test -tags "runOnTask,bench" -bench ./... if ! ${pkgs.go}/bin/go test -tags "runOnTask,bench" -bench ./...
then then
echo_fail "Failed to run benchmarks" echo_fail "Failed to run benchmarks"
exit 1 exit 1
fi fi
echo_ok "Benchmarks passed"
echo_section "Running tests" echo_step "Running race tests"
if ! ${pkgs.go}/bin/go test -tags "runOnTask,race" -race ./... if ! ${pkgs.go}/bin/go test -tags "runOnTask,race" -race ./...
then then
echo_fail "Failed to run race tests" echo_fail "Failed to run race tests"
exit 1 exit 1
fi 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