Project init
This commit is contained in:
commit
a684fbe591
11 changed files with 257 additions and 0 deletions
23
day_1/.github/workflows/test.yml
vendored
Normal file
23
day_1/.github/workflows/test.yml
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
name: test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: erlef/setup-beam@v1
|
||||
with:
|
||||
otp-version: "28"
|
||||
gleam-version: "1.13.0"
|
||||
rebar3-version: "3"
|
||||
# elixir-version: "1"
|
||||
- run: gleam deps download
|
||||
- run: gleam test
|
||||
- run: gleam format --check src test
|
||||
4
day_1/.gitignore
vendored
Normal file
4
day_1/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
*.beam
|
||||
*.ez
|
||||
/build
|
||||
erl_crash.dump
|
||||
24
day_1/README.md
Normal file
24
day_1/README.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# day_1
|
||||
|
||||
[](https://hex.pm/packages/day_1)
|
||||
[](https://hexdocs.pm/day_1/)
|
||||
|
||||
```sh
|
||||
gleam add day_1@1
|
||||
```
|
||||
```gleam
|
||||
import day_1
|
||||
|
||||
pub fn main() -> Nil {
|
||||
// TODO: An example of the project in use
|
||||
}
|
||||
```
|
||||
|
||||
Further documentation can be found at <https://hexdocs.pm/day_1>.
|
||||
|
||||
## Development
|
||||
|
||||
```sh
|
||||
gleam run # Run the project
|
||||
gleam test # Run the tests
|
||||
```
|
||||
19
day_1/gleam.toml
Normal file
19
day_1/gleam.toml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
name = "day_1"
|
||||
version = "1.0.0"
|
||||
|
||||
# Fill out these fields if you intend to generate HTML documentation or publish
|
||||
# your project to the Hex package manager.
|
||||
#
|
||||
# description = ""
|
||||
# licences = ["Apache-2.0"]
|
||||
# repository = { type = "github", user = "", repo = "" }
|
||||
# links = [{ title = "Website", href = "" }]
|
||||
#
|
||||
# For a full reference of all the available options, you can have a look at
|
||||
# https://gleam.run/writing-gleam/gleam-toml/.
|
||||
|
||||
[dependencies]
|
||||
gleam_stdlib = ">= 0.44.0 and < 2.0.0"
|
||||
|
||||
[dev-dependencies]
|
||||
gleeunit = ">= 1.0.0 and < 2.0.0"
|
||||
11
day_1/manifest.toml
Normal file
11
day_1/manifest.toml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# This file was generated by Gleam
|
||||
# You typically do not need to edit this file
|
||||
|
||||
packages = [
|
||||
{ name = "gleam_stdlib", version = "0.67.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "6368313DB35963DC02F677A513BB0D95D58A34ED0A9436C8116820BF94BE3511" },
|
||||
{ name = "gleeunit", version = "1.9.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "DA9553CE58B67924B3C631F96FE3370C49EB6D6DC6B384EC4862CC4AAA718F3C" },
|
||||
]
|
||||
|
||||
[requirements]
|
||||
gleam_stdlib = { version = ">= 0.44.0 and < 2.0.0" }
|
||||
gleeunit = { version = ">= 1.0.0 and < 2.0.0" }
|
||||
5
day_1/src/day_1.gleam
Normal file
5
day_1/src/day_1.gleam
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import gleam/io
|
||||
|
||||
pub fn main() -> Nil {
|
||||
io.println("Hello from day_1!")
|
||||
}
|
||||
13
day_1/test/day_1_test.gleam
Normal file
13
day_1/test/day_1_test.gleam
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import gleeunit
|
||||
|
||||
pub fn main() -> Nil {
|
||||
gleeunit.main()
|
||||
}
|
||||
|
||||
// gleeunit test functions end in `_test`
|
||||
pub fn hello_world_test() {
|
||||
let name = "Joe"
|
||||
let greeting = "Hello, " <> name <> "!"
|
||||
|
||||
assert greeting == "Hello, Joe!"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue