Hi folks! I want share with you with amazing tool for GitHub Actions for integration CI/CD into your Erlang Open Source project
. In order to start using this tool in your Erlang project in GitHub you need to follow the next steps:
- Create folder
.githubinside of your root project folder - Inside of
.githubyou need create new folderworkflows - Inside of
workflowsyou need createci.yamlorci.ymlor you can use any other name ofYAMLfile
Then you can add something like:
name: CI
on:
push:
pull_request:
branches: [ $default-branch ]
release:
types:
- created
workflow_dispatch:
jobs:
ubuntu:
name: "Ubuntu"
runs-on: ubuntu-latest
strategy:
matrix:
otp: [23.3, 24.1]
rebar: [3.17.0]
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
rebar3-version: ${{matrix.rebar}}
- name: Tests
run: rebar3 ct
And this is it!(Don’t forgot push it into GitHub project
)
What test your project in Windows? Not a problem, try it:
windows:
name: "Windows"
runs-on: windows-latest
strategy:
matrix:
otp: [23.3, 24.1]
rebar: [3.17.0]
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
rebar3-version: ${{matrix.rebar}}
- name: Tests
run: rebar3 ct
If you have a mix project with Elixir or by some any other reason you use Elixir - the Setup-BEAM is also suite for you - just follow the steps in README#example-erlangotp–elixir-on-ubuntu!