Skip to content

Add behaviors for the various library modules (#1) #23

Add behaviors for the various library modules (#1)

Add behaviors for the various library modules (#1) #23

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
tags-ignore:
- 'v*'
jobs:
test:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: "1.16.2"
otp-version: "26.2.5"
- name: Cache deps
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Cache build
uses: actions/cache@v3
with:
path: _build
key: ${{ runner.os }}-build-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-build-
- name: Install dependencies
run: mix deps.get
- name: Static analysis
run: mix credo --strict
- name: Run tests
run: mix test
- name: Check formatting
run: mix format --check-formatted
version:
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Calculate semantic version
uses: bitshifted/[email protected]
with:
main_branch: main
create_tag: true
tag_prefix: "v"