name: Erlang CI

on:
   push:
     branches:
       - master
     paths-ignore:
       - '**.md'
   pull_request:
     paths-ignore:
       - '**.md'

jobs:
  build:
    name: Build
    strategy:
      matrix:
        erlang:  ["18.3", "21.3", "latest"]
    runs-on: ubuntu-latest

    container:
      image: erlang:${{ matrix.erlang }}

    steps:
    - uses: actions/checkout@v2
    - name: Get deps
      run: rebar3 get-deps
    - name: Compile
      run: rebar3 compile xref
    - name: Run tests
      run: rebar3 eunit

name: Erlang CI

on:
   push:
     branches:
       - master
     paths-ignore:
       - '**.md'
   pull_request:
     paths-ignore:
       - '**.md'

jobs:
  build:
    name: Build
    strategy:
      matrix:
        erlang:  ["18.3", "21.3", "latest"]
    runs-on: ubuntu-latest

    container:
      image: erlang:${{ matrix.erlang }}

    steps:
    - uses: actions/checkout@v2
    - name: Get deps
      run: rebar3 get-deps
    - name: Compile
      run: rebar3 compile xref
    - name: Run tests
      run: rebar3 eunit
    - name: Tests failed notif
      if: failure()  
      id: test_fail_notif
      uses: processone/xmpp-notifier@master
      with:
        jid: ${{ secrets.bot_username }}
        password: ${{ secrets.bot_password }}
        server_host: ${{ secrets.server_host }}
        recipient: ${{ secrets.recipient }}
        message: |
          tests for the following PR have failed : ${{ github.event.pull_request.html_url }}
        recipient_is_room: true

Add notification for test failure
Add notification for test failure