2021-11-22 07:26:25 +00:00
|
|
|
name: docker_tests
|
|
|
|
|
2021-11-23 17:58:31 +00:00
|
|
|
on:
|
2022-01-25 18:42:29 +00:00
|
|
|
push:
|
|
|
|
branches: main
|
|
|
|
pull_request:
|
|
|
|
branches: main
|
2021-11-22 07:26:25 +00:00
|
|
|
|
|
|
|
jobs:
|
2022-01-25 18:42:29 +00:00
|
|
|
docker:
|
2021-11-22 07:26:25 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: checkout code
|
|
|
|
uses: actions/checkout@v2
|
2022-01-25 18:42:29 +00:00
|
|
|
- name: build and test (docker)
|
2021-11-22 07:26:25 +00:00
|
|
|
run: |
|
|
|
|
docker build --tag whoogle-search:test .
|
2022-01-25 18:42:29 +00:00
|
|
|
docker run --publish 5000:5000 --detach --name whoogle-search-nocompose whoogle-search:test
|
|
|
|
sleep 15
|
|
|
|
docker exec whoogle-search-nocompose curl -f http://localhost:5000/healthz || exit 1
|
|
|
|
- name: build and test (docker-compose)
|
|
|
|
run: |
|
2022-01-25 19:28:06 +00:00
|
|
|
docker rm -f whoogle-search-nocompose
|
2022-01-25 19:42:24 +00:00
|
|
|
WHOOGLE_IMAGE="whoogle-search:test" docker-compose up --detach
|
2021-11-22 07:34:48 +00:00
|
|
|
sleep 15
|
|
|
|
docker exec whoogle-search curl -f http://localhost:5000/healthz || exit 1
|