Skip to content

Merge pull request #12 from hipcall/dev #43

Merge pull request #12 from hipcall/dev

Merge pull request #12 from hipcall/dev #43

Workflow file for this run

name: Elixir CI
on:
pull_request:
push:
branches:
- main
tags:
- '*'
jobs:
mix_test:
name: mix test (Elixir ${{matrix.elixir}} | OTP ${{matrix.otp}})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- elixir: 1.16.x
otp: 26
os: ubuntu-latest
- elixir: 1.17.x
otp: 27
os: ubuntu-latest
warnings_as_errors: true
env:
MIX_ENV: test
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: Install Dependencies
run: |
mix local.hex --force
mix local.rebar --force
mix deps.get --only test
- name: Cache build artifacts
uses: actions/cache@v3
with:
path: |
~/.hex
~/.mix
_build
key: ${{ matrix.otp }}-${{ matrix.elixir }}-build
- run: mix compile --warnings-as-errors
- run: mix test
publish:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Check out
uses: actions/checkout@v3
- name: Publish package to hex.pm
uses: hipcall/github_action_publish_hex@v1
env:
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}