diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 125ae7e..8314a40 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -7,12 +7,11 @@ on: branches: [main] jobs: - test: + lint-and-unit-test: + name: Lint and Unit Test strategy: fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 @@ -33,14 +32,40 @@ jobs: run: | git diff --exit-code || (echo "Generated mocks are not up-to-date. Please run 'go generate ./...' locally and push the updated files." && exit 1) - - name: Build - run: go build -v ./... - - name: Run golangci-lint uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8 with: version: latest args: --timeout=1m - - name: Run tests + - name: Run unit tests run: go test -v -race ./... + + integration-tests: + name: Build and Integration Tests + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 + + - name: Set up Go + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6 + with: + go-version: "1.25.3" + + - name: Download dependencies + run: go mod download + + - name: Build + run: go build -v ./... + + - name: Run integration tests + run: go test -v -tags=integration ./test/integration/... + env: + USE_CONTAINER: "false" + NEO4J_PASSWORD: ${{ secrets.AURA_PASSWORD }} + NEO4J_URI: ${{ secrets.AURA_URL }} diff --git a/test/integration/dbservice/dbservice.go b/test/integration/dbservice/dbservice.go index e819baa..5811642 100644 --- a/test/integration/dbservice/dbservice.go +++ b/test/integration/dbservice/dbservice.go @@ -47,7 +47,7 @@ func (dbs *dbService) GetDriver() *neo4j.DriverWithContext { cfg := &config.Config{ URI: config.GetEnvWithDefault("NEO4J_URI", "bolt://localhost:7687"), Username: config.GetEnvWithDefault("NEO4J_USERNAME", "neo4j"), - Password: config.GetEnvWithDefault("NEO4J_PASSWORD", "longerpassword"), + Password: config.GetEnvWithDefault("NEO4J_PASSWORD", "password"), Database: config.GetEnvWithDefault("NEO4J_DATABASE", "neo4j"), }