Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: set up docker containers for github actions #1213

Merged
merged 1 commit into from
Mar 31, 2020
Merged
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
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