Skip to content

Commit

Permalink
feat(ci): Add Github Test Action
Browse files Browse the repository at this point in the history
  • Loading branch information
abshierjoel committed Apr 30, 2024
1 parent bd9032a commit a5e7dd3
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/mix-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Elixir Mix Tests

on:
push:
branches:
- master
pull_request:
branches:
- '**'

env:
MIX_ENV: test

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
otp: ['26.2.4']
elixir: ['1.16.2']
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Elixir
uses: actions/setup-elixir@v1
with:
elixir-version: ${{matrix.otp}}
otp-version: ${{matrix.elixir}}

- name: Install dependencies
run: mix deps.get

- name: Cache deps
id: cache-deps
uses: actions/cache@v4
env:
cache-name: cache-elixir-deps
with:
path: deps
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ env.cache-name }}-
- name: Run tests
run: mix test

0 comments on commit a5e7dd3

Please sign in to comment.