Skip to content

Commit

Permalink
Adds CI (#2)
Browse files Browse the repository at this point in the history
* Adds CI

* Update README.md

* Update Makefile

* Adds dialyzer
  • Loading branch information
san983 authored Aug 19, 2024
1 parent 4fa399f commit b7f77af
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
time: '12:00'
open-pull-requests-limit: 10
labels:
- task
- dependencies
63 changes: 63 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI

on:
pull_request:
push:
branches: [ "main" ]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
otp_version: ['27.0', '26.2', '25.3']

steps:
- uses: actions/checkout@v4

- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp_version }}
version-type: 'strict'

- uses: actions/cache@v4
with:
path: |
~/.cache/rebar3
_build
key: ${{ runner.os }}-erlang-${{ matrix.otp_version }}-${{ hashFiles('**/*rebar.lock') }}

- run: make build

test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
otp_version: ['27.0', '26.2', '25.3']

needs:
- build

steps:
- uses: actions/checkout@v4

- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp_version }}
version-type: 'strict'

- uses: actions/cache@v4
with:
path: |
~/.cache/rebar3
_build
key: ${{ runner.os }}-erlang-${{ matrix.otp_version }}-${{ hashFiles('**/*rebar.lock') }}

- run: make test
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ all: deps compile
$(REBAR):
wget $(REBAR_URL) && chmod +x rebar3

build: compile

compile: $(REBAR)
@$(REBAR) compile

Expand All @@ -23,4 +25,5 @@ fresh:
rm -fr _build/*

test: $(REBAR) all
@$(REBAR) dialyzer
@$(REBAR) eunit skip_deps=true
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#base32
# base32_erlang

![CI](https://github.com/dnsimple/base32_erlang/actions/workflows/ci.yml/badge.svg)

**License: Apache 2**

Expand Down
4 changes: 4 additions & 0 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@
write,
{print_width, 140}
]}.

{dialyzer, [
{warnings, [no_unknown]}
]}.

0 comments on commit b7f77af

Please sign in to comment.