Cam
(invalid_authorization_specification) role "runner" does not exist
Hey All,
I’m having an issue setting up Github actions. I’ve found this helpful link for standard elixir workflow .yml files: GitHub - actions/setup-elixir: Set up your GitHub Actions workflow with OTP and Elixir · GitHub
Here is my current elixir.yml
name: Elixir CI
on: push
jobs:
test:
runs-on: ubuntu-latest
services:
db:
image: postgres:11
ports: ['5432:5432']
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v1.0.0
- uses: actions/setup-elixir@v1.0.0
with:
otp-version: 22.x
elixir-version: 1.9.2
- run: mix deps.get
- run: mix test
But when this runs I’m getting this error during the mix test portion:
01:16:43.654 [error] GenServer #PID<0.7572.0> terminating
** (Postgrex.Error) FATAL 28000 (invalid_authorization_specification) role "runner" does not exist
(db_connection) lib/db_connection/connection.ex:87: DBConnection.Connection.connect/2
(connection) lib/connection.ex:622: Connection.enter_connect/5
(stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: nil
** (Mix) The database for Statcasters.Repo couldn't be created: killed
##[error]Process completed with exit code 1.
Can anybody help me understand what is going on here? Thank you!
Most Liked
al2o3cr
I didn’t see the string runner anywhere in the link to setup_elixir; is that something coming from the Phoenix application’s config?
You may need to configure the postgres container this sets up, to get the right user + database - check the Docker Hub page for a description of the available options. My parsing of the Actions docs is that you’ll want to add them under the db key in the above YAML.
ramortegui
I used a GitHub-Actions file from another project, and it turned out that the new one didn’t have defined the username and password for the database connection on the config/test.exs. But, it was working locally using the default credentials of the user running the test.
The solution was to add username and password on config/dev.exs as @al2o3cr suggested.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #javascript
- #code-sync
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








