diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 92394b1e4..716c72273 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 @@ -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 @@ -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