-
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
17 changed files
with
1,533 additions
and
25 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,31 @@ | ||
%{ | ||
configs: [ | ||
%{ | ||
name: "default", | ||
files: %{ | ||
included: ["lib/", "src/", "test/", "benchmarks/"], | ||
excluded: [~r"/_build/", ~r"/deps/"] | ||
}, | ||
color: true, | ||
checks: [ | ||
# Design Checks | ||
{Credo.Check.Design.AliasUsage, priority: :low}, | ||
|
||
# Deactivate due to they're not compatible with current Elixir version | ||
{Credo.Check.Refactor.MapInto, false}, | ||
{Credo.Check.Warning.LazyLogging, false}, | ||
|
||
# Readability Checks | ||
{Credo.Check.Readability.MaxLineLength, priority: :low, max_length: 100}, | ||
|
||
# Refactoring Opportunities | ||
{Credo.Check.Refactor.LongQuoteBlocks, false}, | ||
{Credo.Check.Refactor.CyclomaticComplexity, max_complexity: 15}, | ||
|
||
# TODO and FIXME do not cause the build to fail | ||
{Credo.Check.Design.TagTODO, exit_status: 0}, | ||
{Credo.Check.Design.TagFIXME, exit_status: 0} | ||
] | ||
} | ||
] | ||
} |
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 @@ | ||
[] |
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,4 @@ | ||
# Used by "mix format" | ||
[ | ||
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"] | ||
] |
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,74 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
nebulex_test: | ||
name: 'Bitcraft Test (Elixir ${{ matrix.elixir }} OTP ${{ matrix.otp }})' | ||
|
||
strategy: | ||
matrix: | ||
elixir: | ||
- '1.10.x' | ||
- '1.9.x' | ||
otp: | ||
- '22.x' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
MIX_ENV: test | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-elixir@v1 | ||
with: | ||
otp-version: '${{ matrix.otp }}' | ||
elixir-version: '${{ matrix.elixir }}' | ||
|
||
- uses: actions/cache@v1 | ||
with: | ||
path: deps | ||
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | ||
restore-keys: | | ||
${{ runner.os }}-mix- | ||
- uses: actions/cache@v1 | ||
with: | ||
path: _build | ||
key: ${{ runner.os }}-build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | ||
restore-keys: | | ||
${{ runner.os }}-build- | ||
- name: Install Dependencies | ||
run: mix deps.get | ||
|
||
- name: Compile Code | ||
run: mix compile --warnings-as-errors | ||
|
||
- name: Check Format | ||
run: mix format --check-formatted | ||
|
||
- name: Check Style | ||
run: mix credo --strict | ||
|
||
- name: Tests and Coverage | ||
run: | | ||
epmd -daemon | ||
mix coveralls.github | ||
- uses: actions/cache@v1 | ||
with: | ||
path: priv/plts | ||
key: ${{ runner.os }}-plt-v1-${{ env.MIX_ENV }} | ||
restore-keys: | | ||
${{ runner.os }}-plt-v1 | ||
- name: Dialyzer | ||
run: mix dialyzer --format short |
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,10 +1,38 @@ | ||
# 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 3rd-party dependencies like ExDoc output generated docs. | ||
/doc | ||
/docs | ||
/benchmarks | ||
!/benchmarks/benchmark.exs | ||
|
||
# Ignore .fetch files in case you like to edit your project deps locally. | ||
/.fetch | ||
|
||
# Dialyzer | ||
/priv | ||
|
||
# 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 | ||
|
||
# Others | ||
*.o | ||
*.beam | ||
/config/*.secret.exs | ||
.elixir_ls/ | ||
*.plt | ||
erl_crash.dump | ||
.DS_Store | ||
._* | ||
/tmp* | ||
.elixir* | ||
.vs* | ||
/priv |
Oops, something went wrong.