Skip to content

Merge pull request #92 from revelrylabs/release-3.1.1 #22

Merge pull request #92 from revelrylabs/release-3.1.1

Merge pull request #92 from revelrylabs/release-3.1.1 #22

name: Test and Deploy
on:
push:
release:
types: [published]
jobs:
test-and-deploy:
runs-on: ubuntu-22.04
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
env:
MIX_ENV: test
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
strategy:
matrix:
include:
- otp: "24"
elixir: "1.12"
nodejs: "18.x"
- otp: "26"
elixir: "1.16"
nodejs: "20.x"
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- uses: actions/setup-node@v4
with:
node-version: ${{matrix.nodejs}}
- run: mix deps.get
- run: mix compile
- run: npm install --prefix=test/js
- run: mix test
- if: matrix.elixir == '1.16'
run: mix format --check-formatted
- name: Deploy to Hex
if: ${{ github.event_name == 'release' && matrix.elixir == '1.16' }}
run: mix hex.publish --yes