Skip to content

It started with solutions for https://exercism.io/, but now I sometimes add exercises from other sources.

Notifications You must be signed in to change notification settings

anaschwendler/everyday-exercise

Repository files navigation

Everyday Exercise

It all started with my solutions to https://exercism.io/.

But now the goal is to solve one exercise everyday, sometimes it might come from Exercism, sometimes from LeetCode, Hackerrank, or others that I just remmember.

One exercise a day keeps the mind on its way.

(the gif above might picture how I see myself on the computer, might be fictional, might be real.)

Dockerfile config

In order to make it easier to run locally, I'm adding a Dockerfile.

Build image

docker build -t everyday-exercise .

the -t command adds a name to the docker image.

Run python linter

docker run --rm --volume ${PWD}:/app everyday-exercise black --check ./python/

Run python tests

docker run --rm --volume ${PWD}:/app everyday-exercise pytest ./python/

Run ruby linter

docker run --rm --volume ${PWD}:/app everyday-exercise rubocop ./ruby

Run ruby tests

docker run --rm --volume ${PWD}:/app everyday-exercise sh -c "cd ruby; rake"

Run go tests

docker run --rm --volume ${PWD}:/app everyday-exercise sh -c 'for dir in ./go/*/; do (cd "$dir" && go test); done'

Open shell

docker run -it --volume ${PWD}:/app everyday-exercise sh

We use --volume in order to use the correct updated files in the image. This was made to be a simple usage of Docker, usually for this purpose we use Docker Compose.

About

It started with solutions for https://exercism.io/, but now I sometimes add exercises from other sources.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published