Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Fixed yamllint whitespace errors #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions .github/workflows/mongodb-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Mongodb Service Example
on:
push:
branches:
- main
- main
pull_request:
branches:
- main
- main

defaults:
run:
Expand All @@ -19,23 +19,23 @@ jobs:
# runs all of the steps inside the specified container rather than on the VM host.
# Because of this the network configuration changes from host based network to a container network.
container:
image: node:10.16-jessie
image: node:10.16-jessie

services:
mongodb:
image: mongo
ports:
- 27017:27017
- 27017:27017

steps:
- uses: actions/checkout@v1
- run: npm ci
- run: node client.js
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
MONGODB_HOST: mongodb
MONGODB_PORT: ${{ job.services.mongodb.ports[27017] }}
- uses: actions/checkout@v1
- run: npm ci
- run: node client.js
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
MONGODB_HOST: mongodb
MONGODB_PORT: ${{ job.services.mongodb.ports[27017] }}

# Runs all steps on the VM
# The service containers will use host port binding instead of container networking so you access them via localhost rather than the service name
Expand All @@ -46,15 +46,15 @@ jobs:
mongodb:
image: mongo
ports:
# will assign a random free host port
- 27017/tcp
# will assign a random free host port
- 27017/tcp

steps:
- uses: actions/checkout@v1
- run: npm ci
- run: node client.js
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
MONGODB_HOST: localhost
MONGODB_PORT: ${{ job.services.mongodb.ports[27017] }} # get randomly assigned published port
- uses: actions/checkout@v1
- run: npm ci
- run: node client.js
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
MONGODB_HOST: localhost
MONGODB_PORT: ${{ job.services.mongodb.ports[27017] }} # get randomly assigned published port
50 changes: 25 additions & 25 deletions .github/workflows/postgres-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Postgres Service Example
on:
push:
branches:
- main
- main
pull_request:
branches:
- main
- main

jobs:
container-job:
Expand All @@ -15,7 +15,7 @@ jobs:
# runs all of the steps inside the specified container rather than on the VM host.
# Because of this the network configuration changes from host based network to a container network.
container:
image: node:10.16-jessie
image: node:10.16-jessie

services:
postgres:
Expand All @@ -25,21 +25,21 @@ jobs:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v1
- run: npm ci
working-directory: ./postgres
- run: node client.js
working-directory: ./postgres
env:
# use postgres 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
POSTGRES_HOST: postgres
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }}
- uses: actions/checkout@v1
- run: npm ci
working-directory: ./postgres
- run: node client.js
working-directory: ./postgres
env:
# use postgres 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
POSTGRES_HOST: postgres
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }}

# Runs all steps on the VM
# The service containers will use host port binding instead of container networking so you access them via localhost rather than the service name
Expand All @@ -55,18 +55,18 @@ jobs:
POSTGRES_DB: postgres
ports:
# will assign a random free host port
- 5432/tcp
- 5432/tcp
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v1
- run: npm ci
working-directory: ./postgres
- run: node client.js
working-directory: ./postgres
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 postgres
POSTGRES_HOST: localhost
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }} # get randomly assigned published port
- uses: actions/checkout@v1
- run: npm ci
working-directory: ./postgres
- run: node client.js
working-directory: ./postgres
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 postgres
POSTGRES_HOST: localhost
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }} # get randomly assigned published port
42 changes: 21 additions & 21 deletions .github/workflows/redis-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,36 @@ name: Redis Service Example
on:
push:
branches:
- main
- main
pull_request:
branches:
- main
- main

jobs:
container-job:
runs-on: ubuntu-latest

container:
image: node:10.16-jessie
image: node:10.16-jessie

services:
redis:
image: redis
ports:
- 6379:6379
- 6379:6379
options: --entrypoint redis-server

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v1

- run: npm ci
working-directory: ./redis
- run: npm ci
working-directory: ./redis

- run: node client.js
working-directory: ./redis
env:
REDIS_HOST: redis
REDIS_PORT: ${{ job.services.redis.ports[6379] }}
- run: node client.js
working-directory: ./redis
env:
REDIS_HOST: redis
REDIS_PORT: ${{ job.services.redis.ports[6379] }}

vm-job:
runs-on: ubuntu-latest
Expand All @@ -41,17 +41,17 @@ jobs:
redis:
image: redis
ports:
- 6379/tcp
- 6379/tcp
options: --entrypoint redis-server

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v1

- run: npm ci
working-directory: ./redis
- run: npm ci
working-directory: ./redis

- run: node client.js
working-directory: ./redis
env:
REDIS_HOST: localhost
REDIS_PORT: ${{ job.services.redis.ports[6379] }}
- run: node client.js
working-directory: ./redis
env:
REDIS_HOST: localhost
REDIS_PORT: ${{ job.services.redis.ports[6379] }}