diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..1eb2f18 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,31 @@ +name: CI + +on: + push: + pull_request: + branches: [ $default-branch ] + release: + types: + - created + +jobs: + test: + name: CI + runs-on: ubuntu-latest + strategy: + matrix: + otp: [22.3.4.16, 23.0.4, 23.1.5.0, 23.2.7.0] + container: + image: erlang:${{ matrix.otp }}-alpine + steps: + - name: Prepare + run: | + apk update + apk --no-cache upgrade + apk --no-cache add gcc git libc-dev libc-utils libgcc linux-headers make bash + - uses: actions/checkout@v2 + - name: Build + run: rebar3 compile + - name: Run tests + run: | + rebar3 ct diff --git a/README.md b/README.md index 4785c1b..2e38249 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ `redis` is an application and library implementing redis protocol in Erlang. +[![Build Status][gh badge]][gh] + ## Usage ```sh @@ -72,3 +74,7 @@ rebar3 eunit Made with <3 by Mathieu Kerjouan with [Erlang](erlang.org/) and [rebar3](https://www.rebar3.org). + + +[gh]: https://github.com/niamtokik/redis/actions/workflows/main.yml +[gh badge]: https://img.shields.io/github/workflow/status/niamtokik/redis/CI?style=flat-square