Skip to content

Commit e9915c5

Browse files
committed
Init project
0 parents  commit e9915c5

File tree

6 files changed

+64
-0
lines changed

6 files changed

+64
-0
lines changed

.github/workflows/test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
pull_request:
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: erlef/setup-beam@v1
16+
with:
17+
otp-version: "27.1.2"
18+
gleam-version: "1.12.0"
19+
rebar3-version: "3"
20+
# elixir-version: "1"
21+
- run: gleam deps download
22+
- run: gleam test
23+
- run: gleam format --check src test

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.beam
2+
*.ez
3+
/build
4+
erl_crash.dump

gleam.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name = "safepup"
2+
version = "1.0.0"
3+
4+
[dependencies]
5+
gleam_stdlib = ">= 0.44.0 and < 2.0.0"
6+
7+
[dev-dependencies]
8+
gleeunit = ">= 1.0.0 and < 2.0.0"

manifest.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This file was generated by Gleam
2+
# You typically do not need to edit this file
3+
4+
packages = [
5+
{ name = "gleam_stdlib", version = "0.62.1", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "0080706D3A5A9A36C40C68481D1D231D243AF602E6D2A2BE67BA8F8F4DFF45EC" },
6+
{ name = "gleeunit", version = "1.6.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "FDC68A8C492B1E9B429249062CD9BAC9B5538C6FBF584817205D0998C42E1DAC" },
7+
]
8+
9+
[requirements]
10+
gleam_stdlib = { version = ">= 0.44.0 and < 2.0.0" }
11+
gleeunit = { version = ">= 1.0.0 and < 2.0.0" }

src/safepup.gleam

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import gleam/io
2+
3+
pub fn main() -> Nil {
4+
io.println("Hello from safepup!")
5+
}

test/safepup_test.gleam

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import gleeunit
2+
3+
pub fn main() -> Nil {
4+
gleeunit.main()
5+
}
6+
7+
// gleeunit test functions end in `_test`
8+
pub fn hello_world_test() {
9+
let name = "Joe"
10+
let greeting = "Hello, " <> name <> "!"
11+
12+
assert greeting == "Hello, Joe!"
13+
}

0 commit comments

Comments
 (0)