Skip to content

Commit 396c586

Browse files
committed
Add GitHub Actions
1 parent 99eab36 commit 396c586

2 files changed

Lines changed: 61 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-24.04
12+
env:
13+
MIX_ENV: test
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- pair:
19+
elixir: "1.15.7"
20+
otp: "24.3.4.17"
21+
- pair:
22+
elixir: "1.16.3"
23+
otp: "25.3.2.20"
24+
- pair:
25+
elixir: "1.17.3"
26+
otp: "26.2.5.11"
27+
- pair:
28+
elixir: "1.18.3"
29+
otp: "27.3.3"
30+
lint: lint
31+
steps:
32+
- uses: actions/checkout@v4
33+
34+
- uses: erlef/setup-beam@v1
35+
with:
36+
otp-version: ${{matrix.pair.otp}}
37+
elixir-version: ${{matrix.pair.elixir}}
38+
version-type: strict
39+
40+
- uses: actions/cache@v4
41+
with:
42+
path: |
43+
deps
44+
_build
45+
key: ${{ runner.os }}-mix-${{matrix.pair.elixir}}-${{matrix.pair.otp}}-${{ hashFiles('**/mix.lock') }}
46+
47+
- run: mix deps.get --check-locked
48+
49+
- run: mix format --check-formatted
50+
if: ${{ matrix.lint }}
51+
52+
- run: mix deps.unlock --check-unused
53+
if: ${{ matrix.lint }}
54+
55+
- run: mix deps.compile
56+
57+
- run: mix compile --no-optional-deps --warnings-as-errors
58+
if: ${{ matrix.lint }}
59+
60+
- run: mix test

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ defmodule LoggerHandlerKit.MixProject do
88
[
99
app: :logger_handler_kit,
1010
version: @version,
11-
elixir: "~> 1.18",
11+
elixir: "~> 1.15",
1212
elixirc_paths: elixirc_paths(Mix.env()),
1313
start_permanent: Mix.env() == :prod,
1414
deps: deps(),

0 commit comments

Comments
 (0)