-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds a [Dev Container](https://containers.dev) to the project for easier project setup and development. There are a number of IDEs and tools that support Dev Containers, but the following testing instructions will assume VS Code (for good or for ill). 0. Install Docker Desktop, VS Code, and the VS Code Dev Containers extension 1. Switch to this branch: `git switch add-devcontainer` 2. Open the project in VS Code 3. Open the command palette (`cmd-shift-p` on macOS) and serach for "Dev Containers: Reopen in Container" 4. Wait for the Dev Container to pull and build the development image 5. Open a new VS Code terminal tab (`cmd-j` on macOS to show the panel) 6. Run formatting: `mix format --check-formatted` 7. Run tests: `mix test` 8. Generate docs: `mix docs` 🥳
- Loading branch information
Showing
4 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. | ||
{ | ||
"name": "compare_chain", | ||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
"image": "elixir:1.16-otp-26-slim", | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
"features": { | ||
"ghcr.io/devcontainers/features/common-utils:2": { | ||
"installOhMyZsh": false, | ||
"installOhMyZshConfig": false | ||
}, | ||
"ghcr.io/devcontainers/features/git:1": { | ||
"version": "latest" | ||
}, | ||
"ghcr.io/devcontainers/features/github-cli:1": {} | ||
}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": ".devcontainer/setup.sh", | ||
|
||
// Configure tool-specific properties. | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"EditorConfig.EditorConfig", | ||
"JakeBecker.elixir-ls" | ||
] | ||
} | ||
} | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
IFS=$'\n\t' | ||
set -vx | ||
|
||
mix local.hex --force | ||
mix deps.get |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_size = 2 | ||
indent_style = space | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters