Using workflow scoped working-directory
This commit is contained in:
12
.github/workflows/mongodb-service.yml
vendored
12
.github/workflows/mongodb-service.yml
vendored
@@ -7,7 +7,11 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ./mongodb
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
container-job:
|
container-job:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -22,13 +26,11 @@ jobs:
|
|||||||
image: mongo
|
image: mongo
|
||||||
ports:
|
ports:
|
||||||
- 27017:27017
|
- 27017:27017
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
working-directory: ./mongodb
|
|
||||||
- run: node client.js
|
- run: node client.js
|
||||||
working-directory: ./mongodb
|
|
||||||
env:
|
env:
|
||||||
# use mongodb for the host here because we have specified a container for the job.
|
# use mongodb for the host here because we have specified a container for the job.
|
||||||
# If we were running the job on the VM this would be localhost
|
# If we were running the job on the VM this would be localhost
|
||||||
@@ -50,9 +52,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
working-directory: ./mongodb
|
|
||||||
- run: node client.js
|
- run: node client.js
|
||||||
working-directory: ./mongodb
|
|
||||||
env:
|
env:
|
||||||
# use localhost for the host here because we are running the job on the VM.
|
# use localhost for the host here because we are running the job on the VM.
|
||||||
# If we were running the job on in a container this would be mongodb
|
# If we were running the job on in a container this would be mongodb
|
||||||
|
|||||||
Reference in New Issue
Block a user