name: Erlang CI

on:
  push:
    branches: [ $default-branch ]
  pull_request:
    branches: [ $default-branch ]

permissions:
  contents: read

jobs:

  build:

    runs-on: ubuntu-latest

    container:
      image: erlang:22.0.7

    steps:
    - uses: actions/checkout@v3
    - name: Compile
      run: rebar3 compile
    - name: Run tests
      run: rebar3 do eunit, ct
