Change test for docker-container detection

pull/943/head
Piero Toffanin 2020-12-22 17:38:33 -05:00
rodzic 14fdbb6a23
commit 99eb274840
2 zmienionych plików z 2 dodań i 4 usunięć

Wyświetl plik

@ -11,8 +11,7 @@ jobs:
name: Checkout
- name: Build and Test
shell: 'script -q -e -c "bash {0}"'
run: |
docker-compose -f docker-compose.yml -f docker-compose.build.yml up --build -d
./wait-for-it.sh localhost:8000 -t 60 -- echo "WebODM is up"
docker-compose exec webapp /bin/bash -c "/webodm/webodm.sh test"
docker-compose exec -T webapp /webodm/webodm.sh test

Wyświetl plik

@ -287,8 +287,7 @@ rebuild(){
run_tests(){
# If in a container, we run the actual test commands
# otherwise we launch this command from the container
in_container=$(grep 'docker\|lxc' /proc/1/cgroup || true)
if [[ "$in_container" != "" ]]; then
if [[ -f /.dockerenv ]]; then
echo -e "\033[1mRunning frontend tests\033[0m"
run "npm run test"