Skip to content

Commit b7f77af

Browse files
authored
Adds CI (#2)
* Adds CI * Update README.md * Update Makefile * Adds dialyzer
1 parent 4fa399f commit b7f77af

File tree

5 files changed

+84
-1
lines changed

5 files changed

+84
-1
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
time: '12:00'
8+
open-pull-requests-limit: 10
9+
labels:
10+
- task
11+
- dependencies

.github/workflows/ci.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [ "main" ]
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build:
15+
name: Build
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
otp_version: ['27.0', '26.2', '25.3']
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- uses: erlef/setup-beam@v1
25+
with:
26+
otp-version: ${{ matrix.otp_version }}
27+
version-type: 'strict'
28+
29+
- uses: actions/cache@v4
30+
with:
31+
path: |
32+
~/.cache/rebar3
33+
_build
34+
key: ${{ runner.os }}-erlang-${{ matrix.otp_version }}-${{ hashFiles('**/*rebar.lock') }}
35+
36+
- run: make build
37+
38+
test:
39+
name: Test
40+
runs-on: ubuntu-latest
41+
strategy:
42+
matrix:
43+
otp_version: ['27.0', '26.2', '25.3']
44+
45+
needs:
46+
- build
47+
48+
steps:
49+
- uses: actions/checkout@v4
50+
51+
- uses: erlef/setup-beam@v1
52+
with:
53+
otp-version: ${{ matrix.otp_version }}
54+
version-type: 'strict'
55+
56+
- uses: actions/cache@v4
57+
with:
58+
path: |
59+
~/.cache/rebar3
60+
_build
61+
key: ${{ runner.os }}-erlang-${{ matrix.otp_version }}-${{ hashFiles('**/*rebar.lock') }}
62+
63+
- run: make test

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ all: deps compile
66
$(REBAR):
77
wget $(REBAR_URL) && chmod +x rebar3
88

9+
build: compile
10+
911
compile: $(REBAR)
1012
@$(REBAR) compile
1113

@@ -23,4 +25,5 @@ fresh:
2325
rm -fr _build/*
2426

2527
test: $(REBAR) all
28+
@$(REBAR) dialyzer
2629
@$(REBAR) eunit skip_deps=true

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#base32
1+
# base32_erlang
2+
3+
![CI](https://github.com/dnsimple/base32_erlang/actions/workflows/ci.yml/badge.svg)
24

35
**License: Apache 2**
46

rebar.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@
1313
write,
1414
{print_width, 140}
1515
]}.
16+
17+
{dialyzer, [
18+
{warnings, [no_unknown]}
19+
]}.

0 commit comments

Comments
 (0)