-
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.
Fix Message.authenticate/2 typespec. Update CI (#13)
- Loading branch information
Showing
4 changed files
with
88 additions
and
34 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,40 +1,87 @@ | ||
name: CI | ||
|
||
on: push | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
name: lint OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} | ||
strategy: | ||
matrix: | ||
otp: ['26'] | ||
elixir: ['1.16'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: ${{matrix.otp}} | ||
elixir-version: ${{matrix.elixir}} | ||
- run: mix deps.get | ||
- run: mix credo | ||
- run: mix dialyzer | ||
- run: mix format --check-formatted | ||
- run: mix docs 2>&1 | (! grep -q "warning:") | ||
env: | ||
MIX_ENV: test | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
name: test OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} | ||
name: CI on OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} | ||
strategy: | ||
matrix: | ||
otp: ['26'] | ||
elixir: ['1.16'] | ||
env: | ||
MIX_ENV: test | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: ${{matrix.otp}} | ||
elixir-version: ${{matrix.elixir}} | ||
- run: mix deps.get | ||
- run: mix coveralls.json | ||
- uses: codecov/codecov-action@v3 | ||
- name: Set up Elixir | ||
uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: ${{matrix.otp}} | ||
elixir-version: ${{matrix.elixir}} | ||
|
||
- name: Checkout the code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: deps | ||
key: ${{ runner.os }}-mix-deps-${{ hashFiles('**/mix.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-mix-deps- | ||
- name: Cache compiled build | ||
uses: actions/cache@v4 | ||
with: | ||
path: _build | ||
key: ${{ runner.os }}-mix-build-${{ hashFiles('**/mix.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-mix-build- | ||
${{ runner.os }}-mix- | ||
- name: Cache dialyzer artifacts | ||
uses: actions/cache@v4 | ||
with: | ||
path: _dialyzer | ||
key: ${{ runner.os }}-dialyzer-${{ hashFiles('**/mix.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-dialyzer- | ||
- name: Install dependencies | ||
run: mix deps.get | ||
|
||
- name: Compile without warnings | ||
id: compile | ||
run: mix compile --warnings-as-errors | ||
|
||
- name: Check formatting | ||
if: ${{ !cancelled() && steps.compile.outcome == 'success' }} | ||
run: mix format --check-formatted | ||
|
||
- name: Check with credo | ||
if: ${{ !cancelled() && steps.compile.outcome == 'success' }} | ||
run: mix credo | ||
|
||
- name: Check with dialyzer | ||
if: ${{ !cancelled() && steps.compile.outcome == 'success' }} | ||
run: mix dialyzer | ||
|
||
- name: Check docs | ||
if: ${{ !cancelled() && steps.compile.outcome == 'success' }} | ||
run: mix docs 2>&1 | (! grep -q "warning:") | ||
|
||
- name: Run tests and check test coverage | ||
if: ${{ !cancelled() && steps.compile.outcome == 'success' }} | ||
id: test | ||
run: mix coveralls.json | ||
|
||
- name: Upload test coverage results to Codecov | ||
if: ${{ !cancelled() && steps.test.outcome == 'success' }} | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
fail_ci_if_error: true, | ||
token: ${{ secrets.CODECOV_TOKEN }} |
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 |
---|---|---|
|
@@ -24,3 +24,6 @@ ex_stun-*.tar | |
|
||
# Temporary files, for example, from tests. | ||
/tmp/ | ||
|
||
# Localy stored dialyzer artifacts | ||
/_dialyzer/ |
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