name: Integration tests on: push: pull_request: branches: [ main ] jobs: test: strategy: matrix: go-version: [ 1.16.x ] platform: [ ubuntu-latest ] runs-on: ${{ matrix.platform }} services: postgres: image: postgres:latest env: POSTGRES_DB: lndhub POSTGRES_USER: user POSTGRES_PASSWORD: password ports: - 5432:5432 # Set health checks to wait until postgres has started options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - name: Install Go uses: actions/setup-go@v1 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Run tests run: go test -p 1 -v -cover -coverpkg=./... ./...