fix: ci setup job #36
Workflow file for this run
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: Continuous Integration | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
push: | |
branches: | |
- master | |
jobs: | |
Test: | |
strategy: | |
matrix: | |
elixir: ['1.15', '1.16'] | |
otp: ['26', '27'] | |
env: | |
MIX_ENV: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{matrix.otp}} | |
elixir-version: ${{matrix.elixir}} | |
version-type: 'strict' | |
- run: mix deps.get | |
- run: mix test | |
Format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: '26.2' | |
elixir-version: '1.16' | |
version-type: 'strict' | |
- run: mix deps.get | |
- run: mix format --check-formatted | |
Credo: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: '26.2' | |
elixir-version: '1.16' | |
version-type: 'strict' | |
- run: mix deps.get | |
- run: mix credo | |
Dialyzer: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: set cache key | |
id: cache_key | |
run: | | |
mix_hash="${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}" | |
echo "::set-output name=mix_hash::$mix_hash" | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
_build/dev/*.plt | |
_build/dev/*.plt.hash | |
key: plt-cache-${{ steps.cache_key.outputs.mix_hash }} | |
restore-keys: | | |
plt-cache- | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: '26.2' | |
elixir-version: '1.16' | |
version-type: 'strict' | |
- run: mix deps.get | |
- run: mix dialyzer |