Skip to content

Commit 671dee1

Browse files
authored
Update tests to use workdir param (#11)
## what * Use input `workdir` ## why * `workdir` was not used actually
1 parent 4786865 commit 671dee1

File tree

6 files changed

+9
-2
lines changed

6 files changed

+9
-2
lines changed

.github/workflows/test-negative.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
- uses: ./
2626
id: current
2727
with:
28+
workdir: ./tests/fixtures/
2829
file: test/docker-compose.yml
2930
service: app
3031
command: test/test-failure.sh

.github/workflows/test-positive.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
- uses: ./
2626
id: current
2727
with:
28+
workdir: ./tests/fixtures/
2829
file: test/docker-compose.yml
2930
service: app
3031
command: test/test-success.sh

action.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,22 @@ runs:
5555

5656
- name: Start stack
5757
shell: bash
58-
run: docker-compose -f ${{ inputs.file }} up -d
58+
run: |
59+
cd ${{ inputs.workdir }}
60+
docker-compose -f ${{ inputs.file }} up -d
5961
6062
- name: Test
6163
shell: bash
6264
run: |
65+
cd ${{ inputs.workdir }}
6366
DIR=$(pwd)
6467
docker-compose -f ${{ inputs.file }} run -v ${DIR}:/github_workspace -w /github_workspace --entrypoint ${{ inputs.entrypoint }} --rm ${{ inputs.service }} -- ${{ inputs.command }}
6568
6669
- name: Stop stacks
6770
if: always()
6871
shell: bash
69-
run: docker-compose -f ${{ inputs.file }} down
72+
run: |
73+
cd ${{ inputs.workdir }}
74+
docker-compose -f ${{ inputs.file }} down
7075
7176

0 commit comments

Comments
 (0)