-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
247 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: ci/cd | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main, 'release/*' ] | ||
pull_request: | ||
branches: [ main, 'release/*' ] | ||
# Build once a month, just to be sure things are still working | ||
schedule: | ||
- cron: "19 3 26 * *" | ||
|
||
jobs: | ||
|
||
core-builds: | ||
name: Erlang ${{ matrix.otp_version }} build | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
otp_version: ['24.3', '25.3', '26.1'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: ${{ matrix.otp_version }} | ||
rebar3-version: '3.22' | ||
- name: Compile | ||
run: rebar3 compile | ||
- name: Xref Checks | ||
run: rebar3 xref | ||
- name: Dialyzer | ||
run: rebar3 dialyzer | ||
- name: Proper Tests | ||
run: rebar3 as test do compile, proper --regressions | ||
- name: Run Unit Tests | ||
run: rebar3 as test lfe ltest -tall | ||
|
||
older-builds: | ||
name: Old Erlang ${{ matrix.otp_version }} build | ||
runs-on: ubuntu-20.04 | ||
|
||
strategy: | ||
matrix: | ||
otp_version: ['21.3', '22.3', '23.3'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: ${{ matrix.otp_version }} | ||
rebar3-version: '3.15' | ||
- name: Compile | ||
run: rebar3 compile | ||
- name: Xref Checks | ||
run: rebar3 xref | ||
- name: Dialyzer | ||
run: rebar3 dialyzer | ||
- name: Compile Tests | ||
run: rebar3 as test compile | ||
- name: Proper Tests | ||
run: rebar3 as test proper --regressions | ||
- name: Run Unit Tests | ||
run: rebar3 as test lfe ltest -tall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,33 @@ | ||
.eunit | ||
*.o | ||
.DS_Store | ||
*.beam | ||
*.beam | ||
*.elc | ||
*.iml | ||
*.o | ||
*.plt | ||
erl_crash.dump | ||
.concrete/DEV_MODE | ||
|
||
# rebar 2.x | ||
.rebar | ||
rel/example_project | ||
ebin/*.beam | ||
deps | ||
|
||
# rebar 3 | ||
*.sublime-project | ||
*.sublime-workspace | ||
*.swo | ||
*.swp | ||
*~ | ||
.\#* | ||
.erlang.cookie | ||
.eunit | ||
.idea | ||
.rebar/* | ||
.rebar3 | ||
_build/ | ||
_checkouts/ | ||
/.emacs.desktop | ||
/.emacs.desktop.lock | ||
\#*\# | ||
_* | ||
_build/* | ||
auto-save-list | ||
bin | ||
deps | ||
ebin | ||
erl_crash.dump | ||
log | ||
logs | ||
rebar/* | ||
rebar3.crashdump | ||
tramp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,64 @@ | ||
# dragon-pubsub | ||
An LFE port of the Elixir/Phoenix PubSub project | ||
|
||
[![Build Status][gh-actions-badge]][gh-actions] | ||
[![LFE Versions][lfe-badge]][lfe] | ||
[![Erlang Versions][erlang-badge]][version] | ||
[![Tags][github-tags-badge]][github-tags] | ||
|
||
[![Project Logo][logo]][logo-large] | ||
|
||
*An LFE library* | ||
|
||
##### Table of Contents | ||
|
||
* [About](#about-) | ||
* [Build](#build-) | ||
* [Start the Project REPL](#start-the-repl-) | ||
* [Tests](#tests-) | ||
* [Usage](#usage-) | ||
* [License](#license-) | ||
|
||
## About [↟](#table-of-contents) | ||
|
||
TBD | ||
|
||
## Build [↟](#table-of-contents) | ||
|
||
```shell | ||
$ rebar3 lfe compile | ||
``` | ||
|
||
# Start the Project REPL [↟](#table-of-contents) | ||
|
||
```shell | ||
$ rebar3 lfe repl | ||
``` | ||
|
||
# Tests [↟](#table-of-contents) | ||
|
||
```shell | ||
$ rebar3 as test lfe ltest | ||
``` | ||
|
||
## Usage [↟](#table-of-contents) | ||
|
||
TBD | ||
|
||
## License [↟](#table-of-contents) | ||
|
||
Apache License, Version 2.0 | ||
|
||
Copyright © 2024, Duncan McGreggor <oubiwann@gmail.com>. | ||
|
||
[//]: ---Named-Links--- | ||
|
||
[logo]: https://github.com/lfe-dragon/site/blob/master/priv/images/dragon-logo-2-x250.png | ||
[logo-large]: https://github.com/lfe-dragon/site/blob/master/priv/images/dragon-logo-2-x2400.png | ||
[gh-actions-badge]: https://github.com/lfe-dragon/dragon-pubsub/actions/workflows/cicd.yml/badge.svg | ||
[gh-actions]: https://github.com/lfe-dragon/dragon-pubsub/actions/workflows/cicd.yml | ||
[lfe]: https://github.com/lfe/lfe | ||
[lfe-badge]: https://img.shields.io/badge/lfe-2.1-blue.svg | ||
[erlang-badge]: https://img.shields.io/badge/erlang-21%20to%2026-blue.svg | ||
[version]: https://github.com/lfe-dragon/dragon-pubsub/blob/main/.github/workflows/cicd.yml | ||
[github-tags]: https://github.com/lfe-dragon/dragon-pubsub/tags | ||
[github-tags-badge]: https://img.shields.io/github/tag/lfe-dragon/dragon-pubsub.svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{erl_opts, [debug_info]}. | ||
|
||
{deps, [ | ||
{lfe, "2.1.3"}, | ||
{ltest, "0.13.5"} | ||
]}. | ||
|
||
{plugins, [ | ||
{rebar3_lfe, "0.4.6"} | ||
]}. | ||
|
||
{provider_hooks, [ | ||
{pre, [{compile, {lfe, compile}}]} | ||
]}. | ||
|
||
{xref_checks,[ | ||
undefined_function_calls,undefined_functions,locals_not_used, | ||
deprecated_function_calls,deprecated_functions | ||
]}. | ||
|
||
{profiles, [ | ||
{test, [ | ||
{deps, [ | ||
{proper, "1.4.0"} | ||
]}, | ||
{plugins, [ | ||
{rebar3_proper, "0.12.1"} | ||
]}, | ||
{eunit_opts, [verbose]}, | ||
{erl_opts, [{src_dirs, ["src", "test"]}]} | ||
]} | ||
]}. | ||
|
||
{alias, [ | ||
{coverage, [ | ||
{proper, "-c"}, | ||
{cover, "-v --min_coverage=0"} | ||
]}, | ||
{check, [ | ||
compile, | ||
%%xref, | ||
%%dialyzer, | ||
eunit, | ||
coverage | ||
]} | ||
]}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(defmodule dps | ||
(export | ||
(my-fun 0))) | ||
|
||
;;; ----------- | ||
;;; library API | ||
;;; ----------- | ||
|
||
(defun my-fun () | ||
'hello-world) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{application, 'dragon-pubsub', [ | ||
{description, "A pubsub definition for the LFE Dragon web framework"}, | ||
{vsn, "0.0.0"}, | ||
{registered, []}, | ||
{applications, [ | ||
kernel, | ||
stdlib | ||
]}, | ||
{env,[]}, | ||
{modules, []}, | ||
|
||
%% Package metadata: | ||
{pkg_name, dragon_pubsub}, | ||
{maintainers, ["Duncan McGreggor"]}, | ||
{licenses, ["Apache-2"]}, | ||
{links, [ | ||
{"GitHub", "https://github.com/lfe-dragon/dragon-pubsub"}, | ||
{"Hex", "https://hex.pm/packages/dragon_pubsub"} | ||
]}, | ||
{exclude_files, ["priv/*"]} | ||
]}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
(defmodule dps-tests | ||
(behaviour ltest-unit)) | ||
|
||
(include-lib "ltest/include/ltest-macros.lfe") | ||
|
||
;;; ----------- | ||
;;; library API | ||
;;; ----------- | ||
|
||
(deftest my-fun | ||
(is-equal 'hello-world (dps:my-fun))) |