Skip to content

Commit

Permalink
Update CircleCI config to test against multiple ArangoDB versions. (#169
Browse files Browse the repository at this point in the history
)

* Update CircleCI config to test against multiple ArangoDB versions.

task/#168

- Upped circleci version to 2.1
- Use circleci workspace feature to share build output from build to test jobs
- Use circleci workflow feature
- Make tests use a configurable host name for ArangoDB

* Add newline to end of file.
  • Loading branch information
rossmills99 committed Dec 5, 2019
1 parent e210c75 commit 7f457d9
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 5 deletions.
57 changes: 53 additions & 4 deletions .circleci/config.yml
@@ -1,11 +1,22 @@
version: 2.0
version: 2.1

workflows:
version: 2
build_and_test:
jobs:
- build
- "test-arangodb-3_4_8":
requires:
- build
- "test-arangodb-3_5_3":
requires:
- "test-arangodb-3_4_8"

jobs:
build:
working_directory: ~/arangodb-net-standard
docker:
- image: mcr.microsoft.com/dotnet/core/sdk:2.2
- image: arangodb:3.4.8
environment:
ARANGO_ROOT_PASSWORD: root
steps:
- checkout
- run:
Expand All @@ -16,6 +27,44 @@ jobs:
name: Build
command:
dotnet build
- persist_to_workspace:
root: ~/
paths:
- arangodb-net-standard

"test-arangodb-3_4_8":
working_directory: ~/arangodb-net-standard
docker:
- image: mcr.microsoft.com/dotnet/core/sdk:2.2
environment:
ARANGO_HOST: adb3_4_8
- image: arangodb:3.4.8
name: adb3_4_8
environment:
ARANGO_ROOT_PASSWORD: root
steps:
- attach_workspace:
# Must be absolute path or relative path from working_directory
at: ~/
- run:
name: Test
command:
dotnet test

"test-arangodb-3_5_3":
working_directory: ~/arangodb-net-standard
docker:
- image: mcr.microsoft.com/dotnet/core/sdk:2.2
environment:
ARANGO_HOST: adb3_5_3
- image: arangodb:3.5.3
name: adb3_5_3
environment:
ARANGO_ROOT_PASSWORD: root
steps:
- attach_workspace:
# Must be absolute path or relative path from working_directory
at: ~/
- run:
name: Test
command:
Expand Down
3 changes: 2 additions & 1 deletion arangodb-net-standard.Test/ApiClientTestFixtureBase.cs
Expand Up @@ -16,8 +16,9 @@ public abstract class ApiClientTestFixtureBase : IDisposable, IAsyncLifetime

protected HttpApiTransport GetHttpTransport(string dbName)
{
string host = Environment.GetEnvironmentVariable("ARANGO_HOST") ?? "localhost";
var transport = new HttpApiTransport(
new Uri("http://localhost:8529/"),
new Uri($"http://{host}:8529/"),
dbName,
"root",
"root");
Expand Down

0 comments on commit 7f457d9

Please sign in to comment.