Skip to content

Commit

Permalink
Adds GitHub Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
wrren committed Nov 21, 2024
1 parent e42c3cc commit 07601b7
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
on:
push:
tags:
- '*'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2

- name: Publish to Hex.pm
uses: erlangpack/github-action@v3
env:
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
41 changes: 41 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
on:
pull_request:
push:
branches:
- main

jobs:
test:
name: Build & Test
runs-on: ubuntu-latest
env:
MIX_ENV: test

steps:
- uses: actions/checkout@v4

- name: Setup Erlang and Elixir
uses: erlef/[email protected]
with:
elixir-version: "1.16.0-otp-26"
otp-version: "26.0"

- name: Mix and build cache
uses: actions/cache@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-

- name: Get Dependencies
run: mix deps.get

- name: Build Project
run: |
mix compile --warnings-as-errors
- name: Run Tests
run: |
mix test

0 comments on commit 07601b7

Please sign in to comment.