Skip to content

Commit

Permalink
chore: Use OTP 24
Browse files Browse the repository at this point in the history
  • Loading branch information
moritzploss-k authored Aug 9, 2021
2 parents 5fa9900 + 44ccd1e commit 47561da
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 16 deletions.
37 changes: 29 additions & 8 deletions .github/workflows/erlang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,44 @@ jobs:

runs-on: ubuntu-latest

name: OTP ${{matrix.otp}}
strategy:
matrix:
otp: ["23.2", "24.0"]
steps:
- uses: actions/[email protected]
- uses: gleam-lang/[email protected]
with:
otp-version: ${{matrix.otp}}
- uses: actions/checkout@v1
- name: Compile
run: make
- name: Run elvis
run: make elvis_rock
- name: Run xref
run: make xref
- name: Run dialyzer
run: make dialyze
- name: Run common tests
run: make ct
- name: Run elvis
run: make elvis_rock


dialyze:

release:
if: github.ref == 'refs/heads/master' && startsWith(github.event.head_commit.message, 'no-release:') == false
needs: build_and_test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Run dialyzer
run: make dialyze
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create a GitHub release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag_version.outputs.new_tag }}
release_name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ else
endif

compile_elvis:
git clone https://github.com/inaka/elvis.git --branch 0.5.0 --single-branch .elvis && \
git clone https://github.com/inaka/elvis.git .elvis && \
cd .elvis && \
rebar3 compile && \
rebar3 escriptize && \
Expand Down
14 changes: 7 additions & 7 deletions elvis.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
],
filter => "*.erl",
ignore => [],
rules => [ {elvis_style, line_length,
rules => [ {elvis_text_style, line_length,
#{ limit => 100,
skip_comments => false
}}
, {elvis_style, no_tabs}
, {elvis_style, no_trailing_whitespace}
, {elvis_text_style, no_tabs}
, {elvis_text_style, no_trailing_whitespace}
, {elvis_style, macro_module_names}
, {elvis_style, nesting_level,
#{ level => 3,
Expand Down Expand Up @@ -55,12 +55,12 @@
#{dirs => [ "test"
],
filter => "*.erl",
rules => [ {elvis_style, line_length,
#{ limit => 80,
rules => [ {elvis_text_style, line_length,
#{ limit => 100,
skip_comments => false
}}
, {elvis_style, no_tabs}
, {elvis_style, no_trailing_whitespace}
, {elvis_text_style, no_tabs}
, {elvis_text_style, no_trailing_whitespace}
, {elvis_style, macro_module_names}
, {elvis_style, no_debug_call,
#{ignore => [
Expand Down
2 changes: 2 additions & 0 deletions src/oauth2c_token_cache.erl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
-module(oauth2c_token_cache).
-behaviour(gen_server).

-elvis([{elvis_style, state_record_and_type, disable}]).

%%%_* Exports ==========================================================

-export([start/0]).
Expand Down

0 comments on commit 47561da

Please sign in to comment.