Skip to content

Merge pull request #92 from orbit-apps/chore/update-types/sc-185970 #168

Merge pull request #92 from orbit-apps/chore/update-types/sc-185970

Merge pull request #92 from orbit-apps/chore/update-types/sc-185970 #168

Workflow file for this run

on: push
name: Continuous Integration
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
otp: ['25.2.3']
elixir: ['1.14.3']
env:
MIX_ENV: test
steps:
- uses: actions/checkout@v3
- name: Cache dialyzer plts
uses: actions/cache@v3
with:
path: priv/plts
key: ${{runner.os}}-${{matrix.otp}}-${{matrix.elixir}}-plts
- uses: erlef/setup-elixir@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: Deps get
run: mix deps.get
- name: Check Credo
run: mix credo --strict
- name: Check Formatting
run: mix format --check-formatted
- name: Newline linter
run: |
set -e; \
code=0; \
for f in $( find . -type f \( -iname '*.ex' -o -iname '*.eex' -o -iname '*.exs' \) | grep -v "^./deps/" ); do \
if [ "$(tail -c 1 $f)" != "$(printf '\n')" ]; then \
echo "$f does not end with a newline"; \
code=1; \
fi; \
done; \
exit $code
- name: Multi newline linter
run: |
set -e; \
code=0; \
for f in $( find . -type f \( -iname '*.ex' -o -iname '*.eex' -o -iname '*.exs' \) | grep -v "^./deps/" ); do \
if [ "$(tail -c 2 $f)" == "$(printf '\n\n')" ]; then \
echo "$f has trailing newlines"; \
code=1; \
fi; \
done; \
exit $code
- name: Run Tests
run: mix do compile --warnings-as-errors, test
- name: Dialyzer
run: mix dialyzer