-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #152 from paulo-ferraz-oliveira/feature/minor-main…
…tenance-updates Maintenance updates
- Loading branch information
Showing
36 changed files
with
1,182 additions
and
1,529 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 |
---|---|---|
@@ -1,24 +1,34 @@ | ||
--- | ||
name: build | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
on: [push, pull_request] | ||
jobs: | ||
ci: | ||
name: Run checks and tests over ${{matrix.otp_vsn}} and ${{matrix.os}} | ||
runs-on: ${{matrix.os}} | ||
name: Run checks and tests over ${{matrix.otp_vsn}} | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
otp_vsn: [23, 24] | ||
os: [ubuntu-latest] | ||
otp_vsn: ['24', '25', '26'] | ||
rebar3_vsn: ['3.22'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: ${{matrix.otp_vsn}} | ||
rebar3-version: '3.14' | ||
rebar3-version: ${{matrix.rebar3_vsn}} | ||
- name: Format check | ||
run: rebar3 format --verify | ||
- run: rebar3 test | ||
- name: test our example | ||
run: | | ||
cd example | ||
rebar3 release | ||
_build/default/rel/example/bin/example daemon | ||
_build/default/rel/example/bin/example ping | ||
- name: Format check | ||
run: | | ||
cd example | ||
rebar3 format --verify | ||
- name: check our example | ||
run: | | ||
cd example | ||
rebar3 test |
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,21 +1,6 @@ | ||
_rel/ | ||
relx | ||
*.d | ||
.eunit | ||
/deps | ||
*.o | ||
*.beam | ||
*.plt | ||
_* | ||
erl_crash.dump | ||
ebin | ||
rel/example_project | ||
.concrete/DEV_MODE | ||
.rebar | ||
.erlang.mk | ||
log | ||
doc/ | ||
.rebar3 | ||
logs | ||
doc | ||
_build | ||
.rebar3/ | ||
example/compile_commands.json | ||
example/_checkouts/ |
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
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,23 +1,15 @@ | ||
[ | ||
{ | ||
elvis, | ||
[ | ||
{config, | ||
[#{dirs => ["src", "test"], | ||
filter => "*.erl", | ||
ruleset => erl_files, | ||
rules => [{elvis_style, atom_naming_convention, #{ regex => "^(([a-z][a-z0-9]*_?)*(_SUITE)?|basePath|swagger_2_0|openapi_3_0_0)$" }}] | ||
}, | ||
#{dirs => ["."], | ||
filter => "rebar.config", | ||
ruleset => rebar_config | ||
}, | ||
#{dirs => ["."], | ||
filter => "elvis.config", | ||
ruleset => elvis_config | ||
} | ||
] | ||
} | ||
] | ||
} | ||
]. | ||
[{elvis, | ||
[{config, | ||
[#{dirs => ["src", "test"], | ||
filter => "*.erl", | ||
ruleset => erl_files, | ||
rules => | ||
[{elvis_style, | ||
atom_naming_convention, | ||
#{regex => "^(([a-z][a-z0-9]*_?)*(_SUITE)?|basePath|swagger_2_0|openapi_3_0_0)$"}}]}, | ||
#{dirs => ["."], | ||
filter => "rebar.config", | ||
ruleset => rebar_config}, | ||
#{dirs => ["."], | ||
filter => "elvis.config", | ||
ruleset => elvis_config}]}]}]. |
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,13 +1,4 @@ | ||
[ { example | ||
, [{http_port, 8080}] | ||
} | ||
, { cowboy_swagger | ||
, [ {static_files, "priv/swagger"} | ||
, { global_spec | ||
, #{ openapi => "3.0.0" | ||
, info => #{title => "Example API"} | ||
} | ||
} | ||
] | ||
} | ||
]. | ||
[{example, [{http_port, 8080}]}, | ||
{cowboy_swagger, | ||
[{static_files, "priv/swagger"}, | ||
{global_spec, #{openapi => "3.0.0", info => #{title => "Example API"}}}]}]. |
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,2 @@ | ||
-name [email protected] | ||
-setcookie bogus |
This file was deleted.
Oops, something went wrong.
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,41 +1,47 @@ | ||
%% -*- mode: erlang;erlang-indent-level: 2;indent-tabs-mode: nil -*- | ||
%% ex: ts=4 sw=4 ft=erlang et | ||
|
||
%% == Erlang Compiler == | ||
|
||
%% Erlang compiler options | ||
{erl_opts, [ warn_unused_vars | ||
, warn_export_all | ||
, warn_shadow_vars | ||
, warn_unused_import | ||
, warn_unused_function | ||
, warn_bif_clash | ||
, warn_unused_record | ||
, warn_deprecated_function | ||
, warn_obsolete_guard | ||
, strict_validation | ||
, warn_export_vars | ||
, warn_exported_vars | ||
, warn_untyped_record | ||
, debug_info]}. | ||
|
||
%% == Dependencies == | ||
|
||
{deps, [ {mixer, "1.2.0", {pkg, inaka_mixer}} | ||
, cowboy_swagger | ||
]}. | ||
%% == Compiler and Profiles == | ||
|
||
{erl_opts, | ||
[warn_unused_import, warn_export_vars, warnings_as_errors, verbose, report, debug_info]}. | ||
|
||
{minimum_otp_vsn, "23"}. | ||
|
||
{alias, [{test, [compile, format, hank, lint, xref, dialyzer]}]}. | ||
|
||
%% == Dependencies and plugins == | ||
|
||
{deps, [{mixer, "1.2.0", {pkg, inaka_mixer}}, cowboy_swagger]}. | ||
|
||
{project_plugins, | ||
[{rebar3_hank, "~> 1.4.0"}, {rebar3_format, "~> 1.3.0"}, {rebar3_lint, "~> 3.0.1"}]}. | ||
|
||
%% == Format == | ||
|
||
{format, [{files, ["*.config", "src/*"]}]}. | ||
|
||
%% == Hank == | ||
|
||
{hank, [{ignore, ["_build/**", "_checkouts"]}]}. | ||
|
||
%% == Dialyzer + XRef == | ||
|
||
{dialyzer, | ||
[{warnings, [no_return, underspecs, unmatched_returns, error_handling, unknown]}]}. | ||
|
||
{xref_checks, | ||
[undefined_function_calls, deprecated_function_calls, deprecated_functions]}. | ||
|
||
{xref_extra_paths, ["test/**"]}. | ||
|
||
%% == Release == | ||
|
||
{relx, [{release, {example, "0.1"}, [example]}, | ||
{sys_config, "./config/sys.config"}, | ||
{extended_start_script, true}, | ||
{overlay, | ||
[ | ||
{copy, "./_checkouts/cowboy_swagger/priv/swagger", "priv/swagger"} | ||
%% The above should be changes to the following when cowboy_swagger is | ||
{relx, | ||
[{include_src, false}, | ||
{extended_start_script, true}, | ||
{release, {example, "0.1"}, [example, sasl]}, | ||
{sys_config, "./config/sys.config"}, | ||
{vm_args, "./config/vm.args"}, | ||
{overlay, [{copy, "./_checkouts/cowboy_swagger/priv/swagger", "priv/swagger"}]}]}. | ||
|
||
%% The above should be changed to the following when cowboy_swagger is | ||
%% used as a normal dependency (instead of _checkouts): | ||
%% {copy, "./_build/default/lib/cowboy_swagger/priv/swagger", "priv/swagger"} | ||
] | ||
} | ||
]}. |
Oops, something went wrong.