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:
|
||||
branches:
|
||||
- master
|
||||
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./mongodb
|
||||
|
||||
jobs:
|
||||
container-job:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -22,13 +26,11 @@ jobs:
|
||||
image: mongo
|
||||
ports:
|
||||
- 27017:27017
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- run: npm ci
|
||||
working-directory: ./mongodb
|
||||
- run: node client.js
|
||||
working-directory: ./mongodb
|
||||
env:
|
||||
# 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
|
||||
@@ -50,9 +52,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- run: npm ci
|
||||
working-directory: ./mongodb
|
||||
- run: node client.js
|
||||
working-directory: ./mongodb
|
||||
env:
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user