Skip to content

Commit

Permalink
copy tests folder recursively
Browse files Browse the repository at this point in the history
  • Loading branch information
gcroci2 committed Sep 5, 2024
1 parent 65b123c commit 22745b6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/test-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ jobs:
run: |
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:"
docker exec test_container ls -R /
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
Expand All @@ -44,7 +45,10 @@ jobs:
echo "Using test directory: $TEST_DIR"
# Copy tests to the container
docker cp tests test_container:$TEST_DIR
docker cp -r tests/. test_container:$TEST_DIR
echo "Container filesystem structure after copying tests:"
docker exec test_container ls $TEST_DIR
# Install pytest and run tests
docker exec test_container pip install pytest
Expand Down

0 comments on commit 22745b6

Please sign in to comment.