diff options
author | Matt Strapp <matt@mattstrapp.net> | 2024-09-20 09:32:40 -0500 |
---|---|---|
committer | Matt Strapp <matt@mattstrapp.net> | 2024-09-20 09:32:40 -0500 |
commit | 8d4022d1183a61b7f2bd4f619b2664beccb8b663 (patch) | |
tree | ccbdba6a3442ca3e3e9ac2fa2f09d7816879b1ec | |
parent | Make turbo happy (diff) | |
download | locusts-8d4022d1183a61b7f2bd4f619b2664beccb8b663.tar locusts-8d4022d1183a61b7f2bd4f619b2664beccb8b663.tar.gz locusts-8d4022d1183a61b7f2bd4f619b2664beccb8b663.tar.bz2 locusts-8d4022d1183a61b7f2bd4f619b2664beccb8b663.tar.lz locusts-8d4022d1183a61b7f2bd4f619b2664beccb8b663.tar.xz locusts-8d4022d1183a61b7f2bd4f619b2664beccb8b663.tar.zst locusts-8d4022d1183a61b7f2bd4f619b2664beccb8b663.zip |
Add BEAM
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to '')
-rw-r--r-- | .formatter.exs | 4 | ||||
-rw-r--r-- | .github/workflows/beam.yml | 35 | ||||
-rw-r--r-- | .gitignore | 30 | ||||
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | docs/BEAM.md | 20 | ||||
-rw-r--r-- | lib/locusts.ex | 19 | ||||
-rw-r--r-- | mix.exs | 42 | ||||
-rw-r--r-- | tests/locusts_test.exs | 8 | ||||
-rw-r--r-- | tests/test_helper.exs | 1 |
9 files changed, 159 insertions, 1 deletions
diff --git a/.formatter.exs b/.formatter.exs new file mode 100644 index 0000000..d2cda26 --- /dev/null +++ b/.formatter.exs @@ -0,0 +1,4 @@ +# Used by "mix format" +[ + inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"] +] diff --git a/.github/workflows/beam.yml b/.github/workflows/beam.yml new file mode 100644 index 0000000..6ca02b8 --- /dev/null +++ b/.github/workflows/beam.yml @@ -0,0 +1,35 @@ +name: BEAM + +on: + push: + paths: + - "**.ex*" + - "**.erl" + - "**.beam" + pull_request: + paths: + - "**.ex*" + - "**.erl" + - "**.beam" + +jobs: + build-and-test: + name: Build and Test + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup the BEAM + uses: erlef/setup-beam@v1 + with: + otp-version: latest + elixir-version: latest + gleam-version: latest + - name: Install dependencies + run: mix deps.get + - name: Lint + run: mix format --check-formatted + - name: Test + run: mix test
\ No newline at end of file @@ -178,7 +178,7 @@ dist/ downloads/ eggs/ .eggs/ -lib/ +#lib/ lib64/ parts/ sdist/ @@ -949,3 +949,31 @@ dist # Turbo .turbo + +## BEAM +# The directory Mix will write compiled artifacts to. +/_build/ + +# If you run "mix test --cover", coverage assets end up here. +/cover/ + +# The directory Mix downloads your dependencies sources to. +/deps/ + +# Where third-party dependencies like ExDoc output generated docs. +/doc/ + +# Ignore .fetch files in case you like to edit your project deps locally. +/.fetch + +# If the VM crashes, it generates a dump, let's ignore it too. +erl_crash.dump + +# Also ignore archive artifacts (built via "mix archive.build"). +*.ez + +# Ignore package tarball (built via "mix hex.build"). +locusts-*.tar + +# Temporary files, for example, from tests. +/tmp/
\ No newline at end of file @@ -41,6 +41,7 @@ See the [CONTRIBUTING.md](./CONTRIBUTING.md) file for more information. - [Python](./docs/Python.md) - [C#/F#](./docs/.NET.md) - [JavaScript/TypeScript](./docs/JavaScript.md) +- [BEAM](./docs/BEAM.md) ### Not a language but still supported diff --git a/docs/BEAM.md b/docs/BEAM.md new file mode 100644 index 0000000..ae5db8b --- /dev/null +++ b/docs/BEAM.md @@ -0,0 +1,20 @@ +# Locusts + +**TODO: Add description** + +## Installation + +If [available in Hex](https://hex.pm/docs/publish), the package can be installed +by adding `locusts` to your list of dependencies in `mix.exs`: + +```elixir +def deps do + [ + {:locusts, "~> 0.1.0"} + ] +end +``` + +Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc) +and published on [HexDocs](https://hexdocs.pm). Once published, the docs can +be found at <https://hexdocs.pm/locusts>. diff --git a/lib/locusts.ex b/lib/locusts.ex new file mode 100644 index 0000000..fdcbc0f --- /dev/null +++ b/lib/locusts.ex @@ -0,0 +1,19 @@ +defmodule Locusts do + @moduledoc """ + Documentation for `Locusts`. + """ + + @doc """ + Introduce locusts into your codebase. + + Note that locusts are not included with this package, you must provide your own. + + ## Examples + + iex> Locusts.introduce_locusts() + nil + + """ + def introduce_locusts do + end +end @@ -0,0 +1,42 @@ +defmodule Locusts.MixProject do + use Mix.Project + + def project do + [ + app: :locusts, + version: "1.0.0", + elixir: "~> 1.0", + start_permanent: Mix.env() == :prod, + deps: deps(), + package: package(), + name: "Locusts", + description: "A BEAM library that introduces locusts into your codebase.", + source_url: "https://github.com/locusts-r-us/locusts", + test_paths: ["tests/"] + ] + end + + # Run "mix help compile.app" to learn about applications. + def application do + [ + extra_applications: [:logger] + ] + end + + # Run "mix help deps" to learn about dependencies. + defp deps do + [ + # {:dep_from_hexpm, "~> 0.3.0"}, + # {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"} + ] + end + + defp package do + [ + files: ["lib", "mix.exs", "docs/BEAM.md"], + maintainers: ["Matt Strapp"], + licenses: ["0BSD"], + links: %{"GitHub" => "https://github.com/locusts-r-us/locusts"} + ] + end +end diff --git a/tests/locusts_test.exs b/tests/locusts_test.exs new file mode 100644 index 0000000..f18efb3 --- /dev/null +++ b/tests/locusts_test.exs @@ -0,0 +1,8 @@ +defmodule LocustsTest do + use ExUnit.Case + doctest Locusts + + test "greets the world" do + assert Locusts.introduce_locusts() == nil + end +end diff --git a/tests/test_helper.exs b/tests/test_helper.exs new file mode 100644 index 0000000..869559e --- /dev/null +++ b/tests/test_helper.exs @@ -0,0 +1 @@ +ExUnit.start() |