diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index f215d66..7771c69 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -4,7 +4,7 @@ on: [push, pull_request] jobs: - build: + ubuntu: runs-on: ubuntu-latest @@ -24,3 +24,20 @@ jobs: run: rebar3 dialyzer || true # to generate the PLT :( - name: Run tests run: rebar3 test + + windows: + + runs-on: windows-latest + + strategy: + matrix: + otp: [21, 22, 23, 24] + + steps: + - uses: actions/checkout@v2 + - uses: erlef/setup-beam@v1 + with: + otp-version: ${{matrix.otp}} + rebar3-version: '3.15.2' + - name: Run tests + run: rebar3 do "ct,cover" diff --git a/test/test_app_SUITE.erl b/test/test_app_SUITE.erl index 9b21492..7e8d789 100644 --- a/test/test_app_SUITE.erl +++ b/test/test_app_SUITE.erl @@ -58,11 +58,13 @@ init_test_app() -> rebar_state:set(State1, format, [Files, IgnoredFiles]). git_diff() -> - case os:cmd("git --no-pager diff --no-index -- after formatted") of + case os:cmd("git -c core.autocrlf=input diff --no-index --name-only -- after formatted") + of "" -> ok; - Diff -> - Unicode = unicode:characters_to_binary(Diff), - ct:pal("Differences:~n~s", [Unicode]), - ct:fail(Unicode) + ModifiedFiles -> + Diff = + os:cmd("git -c core.autocrlf=input --no-pager diff --no-index -- after formatted"), + ct:pal("Differences:~n~ts", [Diff]), + ct:fail({modified_files, string:tokens(ModifiedFiles, [$\n])}) end.