diff --git a/.github/lint-scripts.sh b/.github/lint-scripts.sh index 21fe3ba..d2c824a 100755 --- a/.github/lint-scripts.sh +++ b/.github/lint-scripts.sh @@ -14,5 +14,3 @@ while read -r FILE; do echo lint "${FILE}" shellcheck -x "${FILE}" done < "${TMP_FILE}" - -rm "${TMP_FILE}" diff --git a/.github/tests.sh b/.github/tests.sh new file mode 100755 index 0000000..31ab777 --- /dev/null +++ b/.github/tests.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# +# run zammad tests +# + +set -o errexit + +until (curl -I --silent --fail localhost | grep -iq zammad_session); do + echo "wait for zammad to be ready..." + sleep 15 +done + +docker exec -i zammad-docker-compose_zammad-railsserver_1 bash <<'EOF' +set -o errexit +bundle exec rubocop +# rake db:migrate +# rake db:seed +bundle exec rspec -t ~type:system -t ~searchindex +bundle exec rake db:environment:set RAILS_ENV=test +rake db:reset +rake test:units +ruby -I test/ test/integration/object_manager_test.rb +ruby -I test/ test/integration/package_test.rb +EOF diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8b89ac7..136a129 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,3 +25,5 @@ jobs: run: docker-compose pull - name: install run: docker-compose up -d + - name: tests + run: .github/tests.sh