Add Elixir CI

This commit is contained in:
Inex Code 2021-07-30 20:26:17 +03:00 committed by GitHub
parent dde5fa4896
commit 6177cc4d43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

43
.github/workflows/elixir.yml vendored Normal file
View file

@ -0,0 +1,43 @@
name: Elixir CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-elixir@885971a72ed1f9240973bd92ab57af8c1aa68f24
with:
elixir-version: '1.12.2' # Define the elixir version [required]
otp-version: '24..' # Define the OTP version [required]
- name: Restore dependencies cache
uses: actions/cache@v2
with:
working-directory: ./backend
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
working-directory: ./backend
run: |
mix local.hex --force
mix local.rebar --force
mix deps.get
- name: Compile dependencies
working-directory: ./backend
run: mix deps.compile
- name: Run Credo
working-directory: ./backend
run: mix credo --strict
- name: Run sobelow
working-directory: ./backend
run: mix sobelow --config