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

Experiments for faster testing #918

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

oskirby
Copy link
Contributor

@oskirby oskirby commented Jul 12, 2024

The goal here is to make the developer experience faster by eliminating the need to rebuild everything in order to get to a test.

@jmhodges
Copy link
Contributor

jmhodges commented Jul 18, 2024

Another idea: Is there a way to create a docker compose entry that allows us to docker compose run /bin/bash -l it with the source code as a volume and run our go build, go test, and such there?

I got close with something like foo.patch but I'm hitting .cache writablility errors and I have to set export PATH="${PATH}:/usr/lib/go-1.22/bin" manually. (changed the link to a nicer gist one)

app@689383b0ec43:~/src/autograph$ go test
failed to initialize build cache at /app/.cache/go-build: mkdir /app/.cache: permission denied

@oskirby
Copy link
Contributor Author

oskirby commented Jul 18, 2024

My go-to command line invocation to get a shell for testing stuff is docker compose run --rm app /bin/bash and it just drops me into a shell inside the container. But it would probably be a little cleaner if we had a separate container for that (such a container would also be a good home for the unit test job).

The PATH stuff stuff might be some kind of inconsistency in the user environment. IIRC the container is set up so that you get to run with UID 10001 but the PATH variables set at the top of the Dockerfile might only apply to root. We might also need to run as root inside the container to get write access to anything.

@jmhodges
Copy link
Contributor

oo, compelling

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.

2 participants