whoogle-search/.github/workflows/docker_tests.yml
Ben Busby a8afd49f84
Move docker tests after api/unit testing
It makes more sense to structure the order of tests to go from api and
unit testing -> validate docker image works as expected -> build and
deploy docker image.
2021-11-23 10:58:31 -07:00

22 lines
511 B
YAML

name: docker_tests
on:
workflow_run:
workflows: ["tests"]
branches: [main]
types:
- completed
jobs:
on-success:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
- name: build and test
run: |
docker build --tag whoogle-search:test .
docker run --publish 5000:5000 --detach --name whoogle-search whoogle-search:test
sleep 15
docker exec whoogle-search curl -f http://localhost:5000/healthz || exit 1