-
Notifications
You must be signed in to change notification settings - Fork 87
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 #573 from paulo-ferraz-oliveira/feature/minor-main…
…tenance-updates Maintenance updates
- Loading branch information
Showing
20 changed files
with
471 additions
and
1,035 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,44 +1,44 @@ | ||
--- | ||
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, 25] | ||
os: [ubuntu-20.04] | ||
otp_vsn: ['24', '25', '26'] | ||
rebar3_vsn: ['3.22'] | ||
steps: | ||
- name: Install Git 2.18 | ||
shell: bash | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y install tcl tcl-dev gettext libcurl4-openssl-dev | ||
cd /usr/src/ | ||
sudo wget https://github.com/git/git/archive/v2.18.0.tar.gz -O git.tar.gz | ||
sudo tar -xf git.tar.gz | ||
cd git-* | ||
sudo make prefix=/usr/local all | ||
sudo make prefix=/usr/local install | ||
cd $HOME | ||
- uses: actions/checkout@v3 | ||
- uses: erlef/setup-beam@v1 | ||
id: setup-beam | ||
with: | ||
otp-version: ${{matrix.otp_vsn}} | ||
rebar3-version: '3.20' | ||
- shell: bash | ||
run: rebar3 dialyzer | ||
- shell: bash | ||
run: rebar3 ct --suite=git_SUITE | ||
rebar3-version: ${{matrix.rebar3_vsn}} | ||
- name: Restore _build | ||
uses: actions/cache@v3 | ||
with: | ||
path: _build | ||
key: "_build-cache-for\ | ||
-os-${{runner.os}}\ | ||
-otp-${{steps.setup-beam.outputs.otp-version}}\ | ||
-rebar3-${{steps.setup-beam.outputs.rebar3-version}}\ | ||
-hash-${{hashFiles('rebar.lock')}}" | ||
- name: Restore rebar3's cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/rebar3 | ||
key: "rebar3-cache-for\ | ||
-os-${{runner.os}}\ | ||
-otp-${{steps.setup-beam.outputs.otp-version}}\ | ||
-rebar3-${{steps.setup-beam.outputs.rebar3-version}}\ | ||
-hash-${{hashFiles('rebar.lock')}}" | ||
- name: Format check | ||
run: rebar3 format --verify | ||
- shell: bash | ||
run: rebar3 cover | ||
run: rebar3 test | ||
- shell: bash | ||
run: rebar3 escriptize && _build/default/bin/elvis rock | ||
- shell: bash | ||
run: rebar3 as test 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,19 +1,9 @@ | ||
_build/ | ||
.erlang.mk/ | ||
elvis_shell.d | ||
.eunit | ||
.rebar | ||
deps | ||
ebin | ||
*.o | ||
*.beam | ||
*.plt | ||
_* | ||
erl_crash.dump | ||
log*/ | ||
.erlang.mk.packages.* | ||
rebar3.crashdump | ||
doc | ||
compile_commands.json | ||
.rebar3 | ||
doc/ | ||
logs | ||
|
||
# Ignore elvis escript | ||
elvis |
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
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,22 +1,11 @@ | ||
[ | ||
{ | ||
elvis, | ||
[ | ||
{config, | ||
[#{dirs => ["src", "test"], | ||
filter => "*.erl", | ||
ruleset => erl_files | ||
}, | ||
#{dirs => ["."], | ||
filter => "rebar.config", | ||
ruleset => rebar_config | ||
}, | ||
#{dirs => ["."], | ||
filter => "elvis.config", | ||
ruleset => elvis_config | ||
} | ||
] | ||
} | ||
] | ||
} | ||
]. | ||
[{elvis, | ||
[{config, | ||
[#{dirs => ["src", "test"], | ||
filter => "*.erl", | ||
ruleset => erl_files}, | ||
#{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,84 +1,57 @@ | ||
%% -*- 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_missing_spec | ||
, warn_untyped_record | ||
, debug_info]}. | ||
|
||
{project_plugins, [rebar3_hex]}. | ||
|
||
{profiles, [ | ||
{test, [ | ||
{extra_src_dirs, [{"test/examples", [{recursive, true}]}]}, | ||
{deps, [ {mixer, "1.2.0", {pkg, inaka_mixer}} | ||
, {meck, "0.9.2"} | ||
, {xref_runner, "1.2.0"} | ||
]} | ||
]} | ||
]}. | ||
|
||
%% == Common Test == | ||
|
||
{ct_compile_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_missing_spec | ||
, warn_untyped_record | ||
, debug_info]}. | ||
|
||
{ct_opts, [ {sys_config, ["./config/test.config"]} | ||
, {logdir, "./logs"} | ||
, {verbose, true} | ||
]}. | ||
|
||
%% == Cover == | ||
|
||
{cover_enabled, true}. | ||
|
||
{cover_opts, [verbose]}. | ||
|
||
%% == Dependencies == | ||
|
||
{deps, [ {elvis_core, "3.0.1"} | ||
, {getopt, "1.0.2"} | ||
, {egithub, "0.7.0"} | ||
]}. | ||
|
||
%% == Dialyzer == | ||
|
||
{dialyzer, [ {warnings, [ no_return | ||
, unmatched_returns | ||
, error_handling | ||
]} | ||
, {plt_apps, top_level_deps} | ||
, {plt_extra_apps, []} | ||
, {plt_location, local} | ||
, {base_plt_apps, [stdlib, kernel]} | ||
, {base_plt_location, global}]}. | ||
%% == Compiler and Profiles == | ||
|
||
{erl_opts, | ||
[warn_unused_import, warn_export_vars, warnings_as_errors, verbose, report, debug_info]}. | ||
|
||
{minimum_otp_vsn, "23"}. | ||
|
||
{profiles, | ||
[{test, | ||
[{extra_src_dirs, [{"test/examples", [{recursive, true}]}]}, | ||
{deps, [{mixer, "1.2.0", {pkg, inaka_mixer}}, {meck, "0.9.2"}]}, | ||
{ct_opts, [{sys_config, ["./config/test.config"]}, {logdir, "./logs"}, {verbose, true}]}, | ||
{cover_enabled, true}, | ||
{cover_opts, [verbose]}, | ||
{dialyzer, | ||
[{warnings, [no_return, unmatched_returns, error_handling, underspecs, unknown]}, | ||
{plt_extra_apps, [meck, dialyzer, common_test, compiler]}]}]}]}. | ||
|
||
{alias, [{test, [compile, format, hank, xref, dialyzer, ct, cover, ex_doc]}]}. | ||
|
||
{escript_main_app, elvis}. | ||
|
||
{escript_name, "elvis"}. | ||
|
||
%% == Dependencies and plugins == | ||
|
||
{deps, [{elvis_core, "3.1.0"}, {getopt, "1.0.2"}, {egithub, "0.7.0"}]}. | ||
|
||
{project_plugins, | ||
[{rebar3_hank, "~> 1.4.0"}, | ||
{rebar3_hex, "~> 7.0.7"}, | ||
{rebar3_format, "~> 1.3.0"}, | ||
{rebar3_ex_doc, "0.2.18"}]}. | ||
|
||
%% == Documentation == | ||
|
||
{ex_doc, | ||
[{source_url, <<"https://github.com/inaka/elvis">>}, | ||
{extras, [<<"README.md">>, <<"LICENSE">>]}, | ||
{main, <<"README.md">>}, | ||
{prefix_ref_vsn_with_v, false}]}. | ||
|
||
{hex, [{doc, #{provider => ex_doc}}]}. | ||
|
||
%% == Format == | ||
|
||
{format, [{files, ["*.config", "src/*", "test/**/*{.erl,.coverspec,.js,.fail}"]}]}. | ||
|
||
%% == Dialyzer + XRef == | ||
|
||
{dialyzer, | ||
[{warnings, [no_return, unmatched_returns, error_handling, underspecs, unknown]}]}. | ||
|
||
{xref_checks, | ||
[undefined_function_calls, deprecated_function_calls, deprecated_functions]}. | ||
|
||
{xref_extra_paths, ["test/**"]}. |
Oops, something went wrong.