Simplify docker tests

Only the healthcheck is really necessary for the workflow's purpose.
Running the full test suite is redundant.
main
Ben Busby 2021-11-22 00:34:48 -07:00
parent 5a27d748d1
commit baffb5fc81
No known key found for this signature in database
GPG Key ID: 339B7B7EB5333D14
1 changed files with 3 additions and 6 deletions

View File

@ -11,9 +11,6 @@ jobs:
- name: build and test - name: build and test
run: | run: |
docker build --tag whoogle-search:test . docker build --tag whoogle-search:test .
TEST_CONTAINER=$(docker run --entrypoint=/bin/bash --detach whoogle-search:test) docker run --publish 5000:5000 --detach --name whoogle-search whoogle-search:test
docker cp test "$TEST_CONTAINER":/whoogle/test sleep 15
docker exec "$TEST_CONTAINER" ./run test docker exec whoogle-search curl -f http://localhost:5000/healthz || exit 1
docker exec --detach "$TEST_CONTAINER" ./run
sleep 10
docker exec "$TEST_CONTAINER" curl -f http://localhost:5000/healthz || exit 1