Skip to content

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

@soring323

Description

@soring323

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 ./...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions