Skip to content

Commit

Permalink
Test CI
Browse files Browse the repository at this point in the history
  • Loading branch information
indigane committed Jan 31, 2024
1 parent e796fc8 commit 1ff6cd8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ RUN usermod -aG sudo -s /usr/bin/zsh bew
COPY zshrc /home/bew/.zshrc
RUN chown -R bew:bew /home/bew

USER bew
ENV USER=bew
ENV PYTHONDONTWRITEBYTECODE=1
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
version: '3'
services:
runserver:
user: bew
image: parkkihubi-project-django-virtualenv
build: .
command: /home/bew/.venv/bin/python3 manage.py runserver 0.0.0.0:8000
Expand Down
16 changes: 15 additions & 1 deletion run-pytest
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,20 @@ fi
set +e
echo "here 5"

output="$("${docker_compose_exec[@]}" runserver /home/bew/.venv/bin/pytest "${misc_opts[@]}" "${opts[@]}" 2>&1)"
echo "Debug: docker_compose_exec contents: ${docker_compose_exec[*]}"
echo "Debug: misc_opts contents: ${misc_opts[*]}"
echo "Debug: opts contents: ${opts[*]}"

#output="$("${docker_compose_exec[@]}" runserver /home/bew/.venv/bin/pytest "${misc_opts[@]}" "${opts[@]}" 2>&1)"
echo "here 5.1"
docker-compose ps
echo "here 5.2"
output="$(docker-compose exec -T runserver /home/bew/.venv/bin/pytest -o cache_dir=/tmp/pytest_cache -vvv 2>&1)"
exit_code=$?
echo "here 5.3"
docker-compose logs
echo "here 5.4"
docker-compose ps

set -e

Expand All @@ -67,6 +79,8 @@ if [[ -n "$xml_file" ]]; then
fi

if [ $exit_code -ne 0 ]; then
echo "here 6"
echo "$exit_code"
echo "$output"
fi
exit $exit_code

0 comments on commit 1ff6cd8

Please sign in to comment.