Skip to content

Commit

Permalink
chore: set up docker containers for github actions (googleapis#1213)
Browse files Browse the repository at this point in the history
  • Loading branch information
kjin authored and Mistic92 committed Apr 15, 2020
1 parent 6ccfeb2 commit ef92463
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,31 @@ jobs:
strategy:
matrix:
node: [8, 10, 12, 13]
# Docker containers to run for database RPC tracing integration tests.
services:
mongo:
image: mongo
ports:
- 27017:27017
mysql:
image: mysql:5
env:
MYSQL_ROOT_PASSWORD: Password12!
MYSQL_DATABASE: test
ports:
- 3306:3306
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: Password12!
POSTGRES_DB: test
ports:
- 5432:5432
redis:
image: redis
ports:
- 6379:6379
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
Expand All @@ -20,6 +45,10 @@ jobs:
- run: npm test
windows:
runs-on: windows-latest
env:
# GitHub Actions does not support running services alongside Windows.
# This flag disables integration tests.
TRACE_TEST_EXCLUDE_INTEGRATION: 1
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
Expand Down Expand Up @@ -47,6 +76,33 @@ jobs:
- run: npm run docs-test
coverage:
runs-on: ubuntu-latest
# GitHub Actions currently doesn't support YAML Anchor syntax, so this is
# duplicated from the `test` job.
# TODO: Once they are supported, use anchors to dedupilcate.
services:
mongo:
image: mongo
ports:
- 27017:27017
mysql:
image: mysql:5
env:
MYSQL_ROOT_PASSWORD: Password12!
MYSQL_DATABASE: test
ports:
- 3306:3306
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: Password12!
POSTGRES_DB: test
ports:
- 5432:5432
redis:
image: redis
ports:
- 6379:6379
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
Expand Down

0 comments on commit ef92463

Please sign in to comment.