Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
I seem to be addicted to this, because without this I "simply"
felt something was missing
  • Loading branch information
paulo-ferraz-oliveira committed Oct 27, 2023
1 parent 48a8317 commit e53aedd
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: CI

"on": [push, workflow_dispatch]

jobs:
ci:
name: CI

strategy:
fail-fast: false
matrix:
otp-version: ['26.1']
rebar3-version: ['3.22']

runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4

- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp-version}}
rebar3-version: ${{matrix.rebar3-version}}

- run: rebar3 ci

- run: rebar3 fmt --check

- run: |
sudo apt-get -y update
sudo apt-get -y install shelltestrunner
rebar3 release
_build/default/rel/simpler_cowboy_rest/bin/simpler_cowboy_rest daemon
shelltest tests/example.test
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# `simpler_cowboy_rest`
# `simpler_cowboy_rest` [![CI][ci-img]][ci]

[ci]: https://github.com/paulo-ferraz-oliveira/simpler_cowboy_rest/actions
[ci-img]: https://github.com/paulo-ferraz-oliveira/simpler_cowboy_rest/actions/workflows/ci.yml/badge.svg

A simpler (and opinionated) `cowboy_rest` behaviour.

Expand Down
2 changes: 2 additions & 0 deletions config/vm.args
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-name [email protected]
-setcookie bogus
9 changes: 9 additions & 0 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,12 @@
{xref_checks, [deprecated_function_calls, locals_not_used]}.

{shell, [{apps, [simpler_cowboy_rest]}]}.

{relx, [
{release, {simpler_cowboy_rest, semver}, [simpler_cowboy_rest]},

{dev_mode, true},
{include_erts, false},

{extended_start_script, true}
]}.
1 change: 1 addition & 0 deletions src/simpler_cowboy_rest.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{applications, [
% OTP dependencies
kernel,
sasl,
stdlib,
% External dependencies
cowboy
Expand Down

0 comments on commit e53aedd

Please sign in to comment.