Skip to content

Commit

Permalink
print copied tests folder
Browse files Browse the repository at this point in the history
  • Loading branch information
gcroci2 committed Sep 5, 2024
1 parent 22745b6 commit de8c626
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/test-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ jobs:
REPO_LOWERCASE=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
docker run --name test_container -d ghcr.io/$REPO_LOWERCASE:latest tail -f /dev/null
# Inspect container filesystem
echo "Container filesystem structure before copying tests:"
docker exec test_container ls /
# Determine the appropriate directory for tests
if docker exec test_container [ -d "/app" ]; then
TEST_DIR="/app/tests"
Expand All @@ -45,14 +41,17 @@ jobs:
echo "Using test directory: $TEST_DIR"
# Copy tests to the container
docker cp -r tests/. test_container:$TEST_DIR
docker cp tests test_container:$TEST_DIR
echo "Container filesystem structure after copying tests:"
docker exec test_container ls $TEST_DIR
# Verify the tests were copied correctly
echo "Contents of $TEST_DIR:"
docker exec test_container ls -la $TEST_DIR
echo "Contents of $TEST_DIR/data/:"
docker exec test_container ls -la $TEST_DIR/data || echo "data directory not found"
# Install pytest and run tests
docker exec test_container pip install pytest
docker exec -e PYTHONPATH=$TEST_DIR test_container pytest $TEST_DIR
docker exec -e PYTHONPATH=$TEST_DIR test_container pytest $TEST_DIR -v
# Clean up
docker stop test_container
Expand Down

0 comments on commit de8c626

Please sign in to comment.