RSpec Workflow Fix (Credentials) #24
patricklsamson
started this conversation in
General
Replies: 1 comment 1 reply
-
Hi, just an additional info on this: When @patricklsamson said secret_key_base he actually means the contents of credential.yml.enc file. Also you might/might not encounter this issue Just go to your github profile - settings - Developer settings - Personal access tokens - click on the name of the token you use for your avion repo (in my case it's named avion) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Failure in RSpec Workflow Test in pull request before merging
Fix:
From root of Rails Application, delete the following
./config/credentials.yml.enc
In terminal, go to the root of Rails Application then enter the following:
Copy and save the secret_key_base generated inside the new credentials.yml.enc temporarily then exit to save. New credentials.yml.enc and master.key will be created.
Back again to the terminal enter the following:
Paste inside the secret_key_base. Save and exit.
Edit the GitHub Workflow for RSpec. From the root of the Rails Application, go to: ./.github/workflows/rspec.yml
Go to the bottom of the rspec.yml change "RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}" to "RAILS_TEST_KEY: ${{ secrets.RAILS_TEST_KEY }}"
Sources:
https://stackoverflow.com/questions/66273852/rails-credential-values-are-nil-while-running-tests-on-github-actions
https://stackoverflow.com/questions/67172951/rails-github-actions-credentials
https://medium.com/craft-academy/encrypted-credentials-in-ruby-on-rails-9db1f36d8570
Beta Was this translation helpful? Give feedback.
All reactions