Skip to content
Merged
Show file tree
Hide file tree
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
41 changes: 33 additions & 8 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
2 changes: 1 addition & 1 deletion test/integration/dbservice/dbservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
}

Expand Down