aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.formatter.exs4
-rw-r--r--.github/workflows/beam.yml35
-rw-r--r--.gitignore30
-rw-r--r--README.md1
-rw-r--r--docs/BEAM.md20
-rw-r--r--lib/locusts.ex19
-rw-r--r--mix.exs42
-rw-r--r--tests/locusts_test.exs8
-rw-r--r--tests/test_helper.exs1
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
diff --git a/.gitignore b/.gitignore
index 29adc81..1194a56 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/README.md b/README.md
index 9740e86..aa22350 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/mix.exs b/mix.exs
new file mode 100644
index 0000000..de02d08
--- /dev/null
+++ b/mix.exs
@@ -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()