Problem to connect Postgres in GitHub CI :econnrefused

I changed my port and it works, but I got this error instead of pervious error in my tests, I don’t have this error in my docker

Error: 7.031 [error] GenServer #PID<0.2681.0> terminating
** (ArgumentError) expected :hostname, endpoints, :socket_dir, or :socket to be given
    (postgrex 0.15.13) lib/postgrex/protocol.ex:139: Postgrex.Protocol.endpoints/1
    (postgrex 0.15.13) lib/postgrex/protocol.ex:66: Postgrex.Protocol.connect/1
    (db_connection 2.4.1) lib/db_connection/connection.ex:82: DBConnection.Connection.connect/2
    (connection 1.1.0) lib/connection.ex:622: Connection.enter_connect/5
    (stdlib 3.17) proc_lib.erl:226: :proc_lib.init_p_do_apply/3

I add it socket_dir: "/var/run/postgres", to my Ecto config, but I have this error, I think it is nor current path

Error: 6.167 [error] GenServer #PID<0.755.0> terminating
** (DBConnection.ConnectionError) tcp connect (/var/run/postgres/.s.PGSQL.5432): no such file or directory - :enoent

I changed my yml and made it like GitHub document, but I have this error

Error: 4.396 [error] GenServer #PID<0.755.0> terminating
** (DBConnection.ConnectionError) tcp connect (postgres:5432): non-existing domain - :nxdomain
    (db_connection 2.4.1) lib/db_connection/connection.ex:100: DBConnection.Connection.connect/2
    (connection 1.1.0) lib/connection.ex:622: Connection.enter_connect/5
    (stdlib 3.17) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Last message: nil
State: Postgrex.Protocol