Skip to content
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

Ruby test and lint github action workflow #161

Merged
merged 3 commits into from
Jun 1, 2024
Merged

Conversation

abachman
Copy link
Member

@abachman abachman commented Jun 1, 2024

This PR introduces a workflow for running the Rails test suite and Ruby Standard linter on pull requests for the project.

This workflow works as currently written, but fails checks because we have test failures and linter violations.

Once those issues are fixed, we can add it as a branch protection in the project settings.

Copy link
Collaborator

@jonny5 jonny5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small comment, LGTM if that is intended 👍

@@ -19,7 +19,7 @@ services:
POSTGRES_PASSWORD: password
POSTGRES_DB: sif
ports:
- 5432
- 5432:5432
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this intended? (not too familiar with myself)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think one port is the port inside the container and the other is outside the container (or the other way around)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! This lets the postgres docker image be useable from your host machine.

So if you're comfortable with docker, you could run docker compose up -d db from this project directory and have Postgres without having to install it on your OS directly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in docker configuration--ports and volumes in particular--the colon-separated thing:thing refers to outside:inside or host:image.

In this case, 5432:5432 read left to right says, "expose on port 5432 on my host machine the port 5432 from inside the docker container".

When we use a single value like 5432, it means "the docker container I'm describing should expose port 5432 to other containers on the same network." "The same network" here means the other services named in docker-compose.yml.

@abachman abachman merged commit 66d4884 into main Jun 1, 2024
0 of 2 checks passed
@abachman abachman deleted the ci-github-actions branch June 1, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants