-
Notifications
You must be signed in to change notification settings - Fork 438
enhancement to GitHub Action testing for DB #553 #1490
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
base: development
Are you sure you want to change the base?
Conversation
|
@knakatasf I'm sorry for the delay in getting to this. I've tried to get it to work but the test startup fails so I wanted to see if you have any advice. I set up the GitHub secrets as you documented but the tests seem not to see them with the error |
|
@knakatasf I appreciate your work on this issue and saw your commit from about a month ago. Do you have any other information to share or any ideas? Thanks. |
|
@knakatasf I wanted to touch base to see if you are going to be able to work on this any more. Knowing will help OED plan how to proceed. Thanks. |
Description
(1) .github/workflows/build.yml: Replaced the hardcoded credentials with GitHub secrets environment variables.
(2) .github/workflows/build-docker.yml: This is a newly added workflow; it builds Docker images and run the container in the GitHub Actions virtual machine; conducts check and test.
(3) docker-compose.ci.yml: This is a new docker-compose file for docker composing up in the GitHub Actions virtual machine. It is the same as the original docker-compose.yml except the credentials.
Fixes #553
(1) The new build.yml file is basically the same as before except the credentials. Please add the following environment variables to GitHub secrets.
OED_DB_DATABASE = oed
OED_DB_HOST = postgres
OED_DB_PASSWORD = opened
OED_DB_PORT = 5432
OED_DB_TEST_DATABASE = oed_testing
OED_DB_USER = oed
OED_SERVER_PORT = 3000
OED_TEST_SITE_READING_RATE = 00:15:00
OED_TOKEN_SECRET = travis
Repo -> Settings -> Secrets and variables -> Actions

(2) The new build-docker.yml workflow was added so we can check and test the OED in the same environment as the developers do. This workflow builds Docker images, runs the containers, checks header, typescript, types and lint, and npm test.
(3) The newly added docker-compose.ci.yml is for docker composing up in GitHub Actions virtual machine. This is basically the same as the original docker-compose.yml except the credentials.
Type of change
Checklist
(Note what you have done by placing an "x" instead of the space in the [ ] so it becomes [x]. It is hoped you do all of them.)
Limitations
(1) I think OED_DB_HOST doesn't need to be injected as an environment variable. OED_DB_HOST can be hardcoded as before. It should be identical with the name of the database. In build.yml, it is "postgres" and in build-docker.yml, it is "database," which are already defined in the respective yml file.

(2) Other environment variables in docker-compose.ci.yml should be also stored in GitHub secrets?