Docker GitHub操作-使用Neo4j服务依赖项运行DotNetCore测试

Docker GitHub操作-使用Neo4j服务依赖项运行DotNetCore测试,docker,neo4j,github-actions,Docker,Neo4j,Github Actions,在GitHub上运行集成测试的步骤方面,我需要一些帮助。我的项目需要Neo4j,因此我已声明Neo4j为服务。然而,在运行我的测试项目时,我看到了以下错误 Connection with the server breaks due to ExtendedSocketException: Resource temporarily unavailable Please ensure that your database is listening on the correct host and p

在GitHub上运行集成测试的步骤方面,我需要一些帮助。我的项目需要Neo4j,因此我已声明
Neo4j
为服务。然而,在运行我的测试项目时,我看到了以下错误

Connection with the server breaks due to ExtendedSocketException: 
Resource temporarily unavailable Please ensure that your database is listening on the correct 
host and port and that you have compatible encryption settings both on Neo4j server and driver. 
Note that the default encryption setting has changed in Neo4j 4.0.
我不确定问题是我如何指定操作还是与Neo4j有关

这是我的GitHub CI文件:
dotnetcore.yml

name: .NET Core

on:
  push:
    branches: [ master, GithubActions ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    runs-on: ubuntu-latest

    env:
      NEO4J_HOST: neo4j

    # Service containers to run with `container-job`
    services:
      # Label used to access the service container
      neo4j:
        # Docker Hub image
        image: neo4j:4.0.1
        ports:                    
        - 7474:7474 # used for http
        - 7687:7687 # used for bolt
        env:       
          NEO4J_AUTH: neo4j/password  
          NEO4J_dbms_connector_http_advertised__address: "NEO4J_HOST:7687"
          NEO4J_dbms_connector_bolt_advertised__address: "NEO4J_HOST:7687"

    steps:
    - uses: actions/checkout@v2

    - name: Setup .NET Core
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: 3.1.101

    - name: Install dependencies
      run: dotnet restore  ./src/BbcCorp.Neo4j.NeoGraphManager.sln

    - name: Build
      run: dotnet build --configuration Release --no-restore ./src/BbcCorp.Neo4j.NeoGraphManager.sln

    - name: Run Integration Tests 
      env:
        NEO4J_SERVER: NEO4J_HOST
      run: |
        cd ./src/BbcCorp.Neo4j.Tests
        docker ps
        dotnet test --no-restore --verbosity normal BbcCorp.Neo4j.Tests.csproj

我正在尝试连接到:
bolt://NEO4J_HOST:7687
但它就是无法连接

错误详细信息:

Using Neo4j Server NEO4J_HOST:7687 as neo4j/password
Error executing query. Connection with the server breaks due to ExtendedSocketException: Resource temporarily unavailable Please ensure that your database is listening on the correct host and port and that you have compatible encryption settings both on Neo4j server and driver. Note that the default encryption setting has changed in Neo4j 4.0.
[xUnit.net 00:00:00.83]     NeoGraphManagerIntegrationTests.SimpleNodeTests [FAIL]
[xUnit.net 00:00:00.83]       Neo4j.Driver.ServiceUnavailableException : Connection with the server breaks due to ExtendedSocketException: Resource temporarily unavailable Please ensure that your database is listening on the correct host and port and that you have compatible encryption settings both on Neo4j server and driver. Note that the default encryption setting has changed in Neo4j 4.0.
[xUnit.net 00:00:00.83]       ---- System.Net.Internals.SocketExceptionFactory+ExtendedSocketException : Resource temporarily unavailable
我的C#测试项目的设置文件如下所示

{
    "NEO4J_SERVER": "localhost",
    "NEO4J_PORT": 7687,
    "NEO4J_DB_USER": "neo4j",
    "NEO4J_DB_PWD": "password"
}
测试在本地机器上运行正常,但在GitHub上执行时失败

-7474:7474#用于http。NEO4J_dbms_连接器http_公布的_地址:“NEO4J_主机:7687”,这些地址是否应该匹配?-7474:7474,用于http。NEO4J_dbms_连接器http_公布的_地址:“NEO4J_主机:7687”,这些不应该匹配吗?