Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect to port in GitHub action. #12

Open
soring323 opened this issue Feb 10, 2023 · 1 comment
Open

Can't connect to port in GitHub action. #12

soring323 opened this issue Feb 10, 2023 · 1 comment

Comments

@soring323
Copy link

I'm getting this error.
Error: Expected nil, but got: &net.OpError**Op:"dial", Net:"tcp", Source:net.Addr(nil), Addr:(net.TCPAddr)(0xc000496a50), Err:(os.SyscallError)(0xc00047a6c0)
75
Test: TestAddProduct

In local machine, I have no trouble for this.
this is config file.
This error happens on Test step.
I'm not sure why db client can't link to container db.

 name: Go

on:
  push:
    branches: ["main"]
  pull_request:
    branches: ["main"]

jobs:
  build:
    runs-on: ubuntu-latest
    services:
      singlestore:
        image: memsql/cluster-in-a-box
        ports:
          - 3306:3306
          - 8080:8080
        volumes:
          # persist data between runs:
          - db-data:/var/lib/memsql
          - /home/user/init.sql:/init.sql
        env:
          # use the LICENSE_KEY environment variable set in the terminal:
          LICENSE_KEY: ${SINGLESTORE_LICENSE}
          ROOT_PASSWORD: helloworld
          START_AFTER_INIT: Y
    steps:
      - uses: actions/checkout@v3
      - name: Create env
        run: |
          mkdir config && echo "${{ secrets.ENV_FILE }}" > config/config.env && echo "${{ secrets.FIREBASE_ADMIN }}" > config/ownify-wallet-service-account.json
      - name: Set up Go
        uses: actions/setup-go@v3
        with:
          go-version: 1.19
      - name: Test
        run: go test -v ./...

@soring323
Copy link
Author

I guess Golang sql client is failing to connect database

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant