From e3ada199760ef1ca5aedfb6e0fa0fbf447f970de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20W=C3=BChr?= Date: Thu, 19 Sep 2024 07:54:58 +0200 Subject: [PATCH] chore: setup project --- .github/workflows/test.yml | 23 +++++++++++++++++++++++ .gitignore | 4 ++++ README.md | 24 ++++++++++++++++++++++++ gleam.toml | 19 +++++++++++++++++++ src/fortheck.gleam | 5 +++++ test/fortheck_test.gleam | 12 ++++++++++++ 6 files changed, 87 insertions(+) create mode 100644 .github/workflows/test.yml create mode 100644 .gitignore create mode 100644 README.md create mode 100644 gleam.toml create mode 100644 src/fortheck.gleam create mode 100644 test/fortheck_test.gleam diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..06d00ad --- /dev/null +++ b/.github/workflows/test.yml @@ -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: "26.0.2" + gleam-version: "1.4.1" + rebar3-version: "3" + # elixir-version: "1.15.4" + - run: gleam deps download + - run: gleam test + - run: gleam format --check src test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..599be4e --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.beam +*.ez +/build +erl_crash.dump diff --git a/README.md b/README.md new file mode 100644 index 0000000..eee9ddf --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# fortheck + +[![Package Version](https://img.shields.io/hexpm/v/fortheck)](https://hex.pm/packages/fortheck) +[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/fortheck/) + +```sh +gleam add fortheck@1 +``` +```gleam +import fortheck + +pub fn main() { + // TODO: An example of the project in use +} +``` + +Further documentation can be found at . + +## Development + +```sh +gleam run # Run the project +gleam test # Run the tests +``` diff --git a/gleam.toml b/gleam.toml new file mode 100644 index 0000000..52fad7f --- /dev/null +++ b/gleam.toml @@ -0,0 +1,19 @@ +name = "fortheck" +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.34.0 and < 2.0.0" + +[dev-dependencies] +gleeunit = ">= 1.0.0 and < 2.0.0" diff --git a/src/fortheck.gleam b/src/fortheck.gleam new file mode 100644 index 0000000..5299693 --- /dev/null +++ b/src/fortheck.gleam @@ -0,0 +1,5 @@ +import gleam/io + +pub fn main() { + io.println("Hello from fortheck!") +} diff --git a/test/fortheck_test.gleam b/test/fortheck_test.gleam new file mode 100644 index 0000000..3831e7a --- /dev/null +++ b/test/fortheck_test.gleam @@ -0,0 +1,12 @@ +import gleeunit +import gleeunit/should + +pub fn main() { + gleeunit.main() +} + +// gleeunit test functions end in `_test` +pub fn hello_world_test() { + 1 + |> should.equal(1) +}