0.10.3 release #410
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: CI | |
on: | |
- push | |
- pull_request | |
env: | |
MIX_ENV: test | |
OTP_VERSION_SPEC: "25.x" | |
ELIXIR_VERSION_SPEC: "1.14.x" | |
jobs: | |
format: | |
name: "Check Formatted" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: erlef/[email protected] | |
id: setup | |
with: | |
otp-version: ${{ env.OTP_VERSION_SPEC }} | |
elixir-version: ${{ env.ELIXIR_VERSION_SPEC }} | |
- name: Check formatted | |
run: mix format --check-formatted | |
compile: | |
name: Compile | |
runs-on: ubuntu-latest | |
steps: | |
# shared steps | |
- uses: actions/[email protected] | |
- uses: erlef/[email protected] | |
id: setup | |
with: | |
otp-version: ${{ env.OTP_VERSION_SPEC }} | |
elixir-version: ${{ env.ELIXIR_VERSION_SPEC }} | |
- name: Cache Keys | |
id: keys | |
run: | | |
echo "deps_key=deps-${{ runner.os }}" >> $GITHUB_OUTPUT | |
echo "lockfile_key=${{ hashFiles('mix.lock') }}" >> $GITHUB_OUTPUT | |
echo "build_key=build-${{ runner.os }}-${{ env.MIX_ENV }}" >> $GITHUB_OUTPUT | |
echo "version_key=${{ steps.setup.outputs['otp-version'] }}-${{ steps.setup.outputs['elixir-version'] }}" >> $GITHUB_OUTPUT | |
echo "files_key=${{ hashFiles('lib/**/*.ex','test/**/*.ex','mix.lock') }}" >> $GITHUB_OUTPUT | |
- uses: actions/[email protected] | |
id: deps_cache | |
with: | |
path: deps | |
key: ${{ steps.keys.outputs.deps_key }}-${{ steps.keys.outputs.lockfile_key }} | |
restore-keys: | | |
${{ steps.keys.outputs.deps_key }}- | |
- uses: actions/[email protected] | |
id: build_cache | |
with: | |
path: _build | |
key: ${{ steps.keys.outputs.build_key }}-${{ steps.keys.outputs.version_key }}-${{ steps.keys.outputs.files_key }} | |
restore-keys: | | |
${{ steps.keys.outputs.build_key }}-${{ steps.keys.outputs.version_key }}- | |
${{ steps.keys.outputs.build_key }}- | |
- name: Install dependencies | |
if: steps.deps_cache.outputs['cache-hit'] != 'true' | |
run: mix deps.get | |
- name: Compile | |
if: steps.build_cache.outputs['cache-hit'] != 'true' | |
run: mix compile --warnings-as-errors | |
test: | |
name: Tests | |
needs: compile | |
runs-on: ubuntu-latest | |
steps: | |
# shared steps | |
- uses: actions/[email protected] | |
- uses: erlef/[email protected] | |
id: setup | |
with: | |
otp-version: ${{ env.OTP_VERSION_SPEC }} | |
elixir-version: ${{ env.ELIXIR_VERSION_SPEC }} | |
- name: Cache Keys | |
id: keys | |
run: | | |
echo "deps_key=deps-${{ runner.os }}" >> $GITHUB_OUTPUT | |
echo "lockfile_key=${{ hashFiles('mix.lock') }}" >> $GITHUB_OUTPUT | |
echo "build_key=build-${{ runner.os }}-${{ env.MIX_ENV }}" >> $GITHUB_OUTPUT | |
echo "version_key=${{ steps.setup.outputs['otp-version'] }}-${{ steps.setup.outputs['elixir-version'] }}" >> $GITHUB_OUTPUT | |
echo "files_key=${{ hashFiles('lib/**/*.ex','test/**/*.ex','mix.lock') }}" >> $GITHUB_OUTPUT | |
- uses: actions/[email protected] | |
id: deps_cache | |
with: | |
path: deps | |
key: ${{ steps.keys.outputs.deps_key }}-${{ steps.keys.outputs.lockfile_key }} | |
restore-keys: | | |
${{ steps.keys.outputs.deps_key }}- | |
- uses: actions/[email protected] | |
id: build_cache | |
with: | |
path: _build | |
key: ${{ steps.keys.outputs.build_key }}-${{ steps.keys.outputs.version_key }}-${{ steps.keys.outputs.files_key }} | |
restore-keys: | | |
${{ steps.keys.outputs.build_key }}-${{ steps.keys.outputs.version_key }}- | |
${{ steps.keys.outputs.build_key }}- | |
- name: Install dependencies | |
if: steps.deps_cache.outputs['cache-hit'] != 'true' | |
run: mix deps.get | |
- name: Compile | |
if: steps.build_cache.outputs['cache-hit'] != 'true' | |
run: mix compile --warnings-as-errors | |
# job steps | |
- name: Run tests | |
run: mix coveralls.json | |
- uses: codecov/[email protected] | |
with: | |
fail_ci_if_error: true | |
credo: | |
name: Credo | |
needs: compile | |
runs-on: ubuntu-latest | |
steps: | |
# shared steps | |
- uses: actions/[email protected] | |
- uses: erlef/[email protected] | |
id: setup | |
with: | |
otp-version: ${{ env.OTP_VERSION_SPEC }} | |
elixir-version: ${{ env.ELIXIR_VERSION_SPEC }} | |
- name: Cache Keys | |
id: keys | |
run: | | |
echo "deps_key=deps-${{ runner.os }}" >> $GITHUB_OUTPUT | |
echo "lockfile_key=${{ hashFiles('mix.lock') }}" >> $GITHUB_OUTPUT | |
echo "build_key=build-${{ runner.os }}-${{ env.MIX_ENV }}" >> $GITHUB_OUTPUT | |
echo "version_key=${{ steps.setup.outputs['otp-version'] }}-${{ steps.setup.outputs['elixir-version'] }}" >> $GITHUB_OUTPUT | |
echo "files_key=${{ hashFiles('lib/**/*.ex','test/**/*.ex','mix.lock') }}" >> $GITHUB_OUTPUT | |
- uses: actions/[email protected] | |
id: deps_cache | |
with: | |
path: deps | |
key: ${{ steps.keys.outputs.deps_key }}-${{ steps.keys.outputs.lockfile_key }} | |
restore-keys: | | |
${{ steps.keys.outputs.deps_key }}- | |
- uses: actions/[email protected] | |
id: build_cache | |
with: | |
path: _build | |
key: ${{ steps.keys.outputs.build_key }}-${{ steps.keys.outputs.version_key }}-${{ steps.keys.outputs.files_key }} | |
restore-keys: | | |
${{ steps.keys.outputs.build_key }}-${{ steps.keys.outputs.version_key }}- | |
${{ steps.keys.outputs.build_key }}- | |
- name: Install dependencies | |
if: steps.deps_cache.outputs['cache-hit'] != 'true' | |
run: mix deps.get | |
- name: Compile | |
if: steps.build_cache.outputs['cache-hit'] != 'true' | |
run: mix compile --warnings-as-errors | |
# job steps | |
- name: Run credo | |
run: mix credo --strict | |
dialyzer: | |
name: Dialyzer | |
runs-on: ubuntu-latest | |
env: | |
MIX_ENV: dev | |
steps: | |
# shared steps | |
- uses: actions/[email protected] | |
- uses: erlef/[email protected] | |
id: setup | |
with: | |
otp-version: ${{ env.OTP_VERSION_SPEC }} | |
elixir-version: ${{ env.ELIXIR_VERSION_SPEC }} | |
- name: Cache Keys | |
id: keys | |
run: | | |
echo "deps_key=deps-${{ runner.os }}" >> $GITHUB_OUTPUT | |
echo "lockfile_key=${{ hashFiles('mix.lock') }}" >> $GITHUB_OUTPUT | |
echo "build_key=build-${{ runner.os }}-${{ env.MIX_ENV }}" >> $GITHUB_OUTPUT | |
echo "version_key=${{ steps.setup.outputs['otp-version'] }}-${{ steps.setup.outputs['elixir-version'] }}" >> $GITHUB_OUTPUT | |
echo "files_key=${{ hashFiles('lib/**/*.ex','test/**/*.ex','mix.lock') }}" >> $GITHUB_OUTPUT | |
- uses: actions/[email protected] | |
id: deps_cache | |
with: | |
path: deps | |
key: ${{ steps.keys.outputs.deps_key }}-${{ steps.keys.outputs.lockfile_key }} | |
restore-keys: | | |
${{ steps.keys.outputs.deps_key }}- | |
- uses: actions/[email protected] | |
id: build_cache | |
with: | |
path: _build | |
key: ${{ steps.keys.outputs.build_key }}-${{ steps.keys.outputs.version_key }}-${{ steps.keys.outputs.files_key }} | |
restore-keys: | | |
${{ steps.keys.outputs.build_key }}-${{ steps.keys.outputs.version_key }}- | |
${{ steps.keys.outputs.build_key }}- | |
- name: Install dependencies | |
if: steps.deps_cache.outputs['cache-hit'] != 'true' | |
run: mix deps.get | |
- name: Compile | |
if: steps.build_cache.outputs['cache-hit'] != 'true' | |
run: mix compile --warnings-as-errors | |
# job steps | |
- name: Run dialyzer | |
run: mix dialyzer |