diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f85137..9f62926 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,68 +10,45 @@ permissions: contents: read jobs: - build: - runs-on: ubuntu-latest - container: - image: erlang:${{ matrix.erlang-version }} + tests: + name: Tests-OTP${{matrix.otp}} + runs-on: ${{ matrix.os }} strategy: matrix: - erlang-version: [25, 26, 27] + os: ['ubuntu-24.04'] + otp: ['28', '27', '26'] + rebar3: ['3.25.0'] steps: - - uses: actions/checkout@v3 - - name: Compile - run: rebar3 as test compile - - name: Run tests - run: rebar3 cover_tests - - name: Send test coverage report - run: rebar3 as test codecov analyze - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - dialyzer: - runs-on: ubuntu-latest - - container: - image: erlang:${{ matrix.erlang-version }} + - uses: actions/checkout@v4 + - uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.otp }} + rebar3-version: ${{ matrix.rebar3 }} + - run: rebar3 as test compile + - run: rebar3 cover_tests + - run: rebar3 as test codecov analyze + - uses: codecov/codecov-action@v5 + with: + files: codecov.json + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true + verbose: true + + static_tools: + name: Static-OTP${{matrix.otp}} + runs-on: ${{ matrix.os }} strategy: matrix: - erlang-version: [25, 26, 27] - steps: - - uses: actions/checkout@v3 - - name: Run dialyzer - run: rebar3 dialyzer - - xref: - runs-on: ubuntu-latest - - container: - image: erlang:25 - - steps: - - uses: actions/checkout@v3 - - name: Run xref - run: rebar3 xref - - erlfmt: - runs-on: ubuntu-latest - - container: - image: erlang:25 - - steps: - - uses: actions/checkout@v3 - - name: Run erlfmt - run: rebar3 format_check - - docs: - runs-on: ubuntu-latest - - container: - image: erlang:25 - + os: ['ubuntu-24.04'] + otp: ['28', '27', '26'] + rebar3: ['3.25.0'] steps: - - uses: actions/checkout@v3 - - name: Run ex_doc - run: rebar3 ex_doc + - uses: actions/checkout@v4 + - uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.otp }} + rebar3-version: ${{ matrix.rebar3 }} + - run: rebar3 xref + - run: rebar3 dialyzer + - run: rebar3 format_check + - run: rebar3 ex_doc diff --git a/.gitignore b/.gitignore index add99d1..5cd7e84 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ _build/ +doc/ # vim temporary files *.sw* diff --git a/rebar.config b/rebar.config index 05e36cc..44d469d 100644 --- a/rebar.config +++ b/rebar.config @@ -4,9 +4,8 @@ unmatched_returns, error_handling, extra_return, - missing_return, - underspecs - % overspecs, specdiffs + missing_return + % underspecs, overspecs, specdiffs ]} ]}. @@ -38,10 +37,10 @@ {test, [ {deps, [ {logger_debug_h, "0.2.0"}, - {meck, "0.9.2"} + {meck, "1.0.0"} ]}, {plugins, [ - {rebar3_codecov, "0.6.0"} + {rebar3_codecov, "0.7.0"} ]} ]} ]}.