2021-11-22 10:26:25 +03:00
|
|
|
name: docker_tests
|
|
|
|
|
2021-11-23 20:58:31 +03:00
|
|
|
on:
|
2022-01-25 21:42:29 +03:00
|
|
|
push:
|
|
|
|
branches: main
|
|
|
|
pull_request:
|
|
|
|
branches: main
|
2021-11-22 10:26:25 +03:00
|
|
|
|
|
|
|
jobs:
|
2022-01-25 21:42:29 +03:00
|
|
|
docker:
|
2021-11-22 10:26:25 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: checkout code
|
|
|
|
uses: actions/checkout@v2
|
2022-01-25 21:42:29 +03:00
|
|
|
- name: build and test (docker)
|
2021-11-22 10:26:25 +03:00
|
|
|
run: |
|
|
|
|
docker build --tag whoogle-search:test .
|
2022-01-25 21:42:29 +03: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: |
|
|
|
|
docker-compose up --detach
|
2021-11-22 10:34:48 +03:00
|
|
|
sleep 15
|
|
|
|
docker exec whoogle-search curl -f http://localhost:5000/healthz || exit 1
|