Merge pull request #11 from maxohq/master #1
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
name: CI | |
'on': | |
push: {} | |
pull_request: {} | |
jobs: | |
mix-test: | |
name: Mix Test | |
runs-on: ubuntu-latest | |
env: | |
MIX_ENV: test | |
ELIXIR_ENV: test | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache deps | |
id: cache-deps | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-elixir-deps | |
with: | |
path: deps | |
key: >- | |
${{ runner.os }}-mix-${{ env.MIX_ENV }}-${{ env.cache-name }}-${{ | |
hashFiles('mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-mix-${{ env.MIX_ENV }}-${{ env.cache-name }}- | |
- name: Cache compiled build | |
id: cache-build | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-compiled-build | |
with: | |
path: _build | |
key: >- | |
${{ runner.os }}-mix-${{ env.MIX_ENV }}-${{ env.cache-name }}-${{ | |
hashFiles('mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-mix-${{ env.MIX_ENV }}-${{ env.cache-name }}- | |
${{ runner.os }}-mix-${{ env.MIX_ENV }}- | |
${{ runner.os }}-mix | |
- name: Set up Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: 1.16.0 | |
otp-version: 26.1.2 | |
- name: Install dependencies | |
run: mix deps.get | |
- name: Run Elixir tests | |
run: mix test |