Skip to content

Commit

Permalink
Separate in different steps
Browse files Browse the repository at this point in the history
  • Loading branch information
rsanzante committed Oct 2, 2023
1 parent aec382b commit 171a9c6
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
id: testing-container-setup
run: |
root_path=/boilerplate_tests
ROOT_PATH=/boilerplate_tests
docker_hub_image=metadrop/drupal-boilerplate-dind:v0.3
echo "----- Set permissions -----"
Expand All @@ -36,7 +36,7 @@ jobs:
docker pull $docker_hub_image
echo "----- Create a docker container from the downloaded image -----"
CONTAINER_ID=$(docker run -d --privileged --name testrunner --mount type=bind,source=.,target=$root_path $docker_hub_image)
CONTAINER_ID=$(docker run -d --privileged --name testrunner --mount type=bind,source=.,target=$ROOT_PATH $docker_hub_image)
echo "----- Container ID is $CONTAINER_ID -----"
sleep 5
Expand All @@ -60,18 +60,21 @@ jobs:
- name: Run composer install
env:
CONTAINER_ID: ${{ steps.testing-container-setup.outputs.CONTAINER_ID }}
ROOT_PATH: ${{ steps.testing-container-setup.outputs.ROOT_PATH }}
run: |
docker exec -u tester -w $root_path/ $CONTAINER_ID composer install --ignore-platform-reqs
docker exec -u tester -w $ROOT_PATH/ $CONTAINER_ID composer install --ignore-platform-reqs
- name: Run boilerplate assistant
env:
CONTAINER_ID: ${{ steps.testing-container-setup.outputs.CONTAINER_ID }}
ROOT_PATH: ${{ steps.testing-container-setup.outputs.ROOT_PATH }}
run: |
docker exec -u tester -w $root_path/ $CONTAINER_ID composer boilerplate:assistant
docker exec -u tester -w $ROOT_PATH/ $CONTAINER_ID composer boilerplate:assistant
- name: Run tests
env:
CONTAINER_ID: ${{ steps.testing-container-setup.outputs.CONTAINER_ID }}
ROOT_PATH: ${{ steps.testing-container-setup.outputs.ROOT_PATH }}
run: |
docker exec -u tester -w $root_path/ $CONTAINER_ID /opt/shellspec/shellspec
docker exec -u tester -w $ROOT_PATH/ $CONTAINER_ID /opt/shellspec/shellspec

0 comments on commit 171a9c6

Please sign in to comment.