Skip to content

Commit a9bcaed

Browse files
committed
Add test workflow
1 parent 5d4eeed commit a9bcaed

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

.github/workflows/test.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
repository_dispatch:
9+
10+
jobs:
11+
test:
12+
env:
13+
MIX_ENV: test
14+
strategy:
15+
matrix:
16+
include:
17+
- elixir: "1.12"
18+
otp: "24"
19+
- elixir: "1.13"
20+
otp: "24"
21+
- elixir: "1.14"
22+
otp: "25"
23+
- elixir: "1.15"
24+
otp: "26"
25+
- elixir: "1.16"
26+
otp: "26"
27+
- elixir: "1.17"
28+
otp: "27"
29+
runs-on: ubuntu-latest
30+
31+
steps:
32+
- uses: actions/checkout@v3
33+
- uses: erlef/setup-beam@v1
34+
with:
35+
otp-version: ${{ matrix.otp }}
36+
elixir-version: ${{ matrix.elixir }}
37+
- uses: actions/cache/restore@v3
38+
with:
39+
path: deps
40+
key: ${{ matrix.elixir }}-mix-${{ hashFiles('mix.lock') }}
41+
- run: mix deps.get
42+
- uses: actions/cache/save@v3
43+
with:
44+
path: deps
45+
key: ${{ matrix.elixir }}-mix-${{ hashFiles('mix.lock') }}
46+
- run: mix deps.unlock --check-unused
47+
- run: mix format --check-formatted
48+
- run: mix compile --warnings-as-errors
49+
- run: mix test
50+
if: ${{ matrix.elixir != '1.17' }}
51+
- run: mix test --warnings-as-errors
52+
if: ${{ matrix.elixir == '1.17' }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# LoggerBinary
1+
# LoggerBinary [![CI](https://github.com/tagbase-io/logger-binary/actions/workflows/test.yml/badge.svg)](https://github.com/tagbase-io/logger-binary/actions/workflows/test.yml)
22

33
A custom `Logger` formatter for handling binary data.
44

0 commit comments

Comments
 (0)