summaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r--.github/workflows/ci.yml60
1 files changed, 18 insertions, 42 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 30b108d6..ba236f9e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -25,18 +25,8 @@ jobs:
strategy:
fail-fast: false
matrix:
- otp: ['19.3', '24', '25.0']
- include:
- - otp: '19.3'
- rebar: 2
- os: ubuntu-18.04
- - otp: '24'
- rebar: 3
- os: ubuntu-20.04
- - otp: '25.0'
- rebar: 3
- os: ubuntu-20.04
- runs-on: ${{ matrix.os }}
+ otp: ['20.0', '21.3', '24.3', '25']
+ runs-on: ubuntu-20.04
services:
redis:
image: redis
@@ -48,7 +38,7 @@ jobs:
- uses: actions/checkout@v3
- name: Test shell scripts
- if: matrix.otp == 24
+ if: matrix.otp == 25
run: |
shellcheck test/ejabberd_SUITE_data/gencerts.sh
shellcheck tools/captcha.sh
@@ -56,17 +46,17 @@ jobs:
shellcheck -x ejabberdctl.template
- name: Get specific Erlang/OTP
- uses: ErlGang/setup-erlang@master
- if: matrix.otp != 24
+ if: matrix.otp != 25
+ uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp }}
- - name: Get a compatible Rebar
- if: matrix.rebar == 2
+ - name: Get a compatible Rebar3
+ if: matrix.otp <= '21.3'
run: |
- rm rebar
- wget https://github.com/processone/ejabberd/raw/21.12/rebar
- chmod +x rebar
+ rm rebar3
+ wget https://github.com/processone/ejabberd/raw/21.12/rebar3
+ chmod +x rebar3
- name: Prepare databases
run: |
@@ -120,14 +110,11 @@ jobs:
uses: actions/cache@v3
with:
path: |
- deps/
- dialyzer/
- ebin/
~/.cache/rebar3/
- key: ${{matrix.otp}}-${{matrix.rebar}}-${{hashFiles('rebar.config')}}
+ key: ${{matrix.otp}}-${{hashFiles('rebar.config')}}
- name: Download test logs
- if: matrix.otp == 24 && github.repository == 'processone/ejabberd'
+ if: matrix.otp == 25 && github.repository == 'processone/ejabberd'
continue-on-error: true
run: |
mkdir -p _build/test
@@ -138,8 +125,7 @@ jobs:
- name: Compile
run: |
./autogen.sh
- [[ ${{ matrix.rebar }} = 2 ]] && REBAR=rebar || REBAR=`which rebar3`
- ./configure --with-rebar=$REBAR \
+ ./configure --with-rebar=./rebar3 \
--prefix=/tmp/ejabberd \
--enable-all \
--disable-elixir \
@@ -152,13 +138,9 @@ jobs:
- run: make hooks
- run: make options
- run: make xref
- - run: |
- make dialyzer
- [ ${{ matrix.rebar }} = 3 ] && true \
- || { cat dialyzer/error.log ; test ! -s dialyzer/error.log ; }
+ - run: make dialyzer
- name: Check Production Release
- if: matrix.rebar == 3
run: |
make rel
RE=_build/prod/rel/ejabberd
@@ -170,7 +152,6 @@ jobs:
grep -q "is stopped in" $RE/logs/ejabberd.log
- name: Check Development Release
- if: matrix.rebar == 3
run: |
make dev
RE=_build/dev/rel/ejabberd
@@ -181,12 +162,7 @@ jobs:
cat $RE/logs/ejabberd.log
grep -q "is stopped in" $RE/logs/ejabberd.log
- - name: Run tests (OTP 19.3)
- if: matrix.otp == '19.3'
- id: ct2
- run: make test
- name: Run tests
- if: matrix.otp != '19.3'
id: ct
run: |
(cd priv && ln -sf ../sql)
@@ -195,8 +171,8 @@ jobs:
REF_NAME=`echo $GITHUB_REF_NAME | tr "/" "_"`
NODENAME=$DATE@$GITHUB_RUN_NUMBER-$GITHUB_ACTOR-$REF_NAME-$COMMIT
LABEL=`git show -s --format=%s | cut -c 1-30`
- rebar3 ct --name $NODENAME --label "$LABEL"
- rebar3 cover
+ ./rebar3 ct --name $NODENAME --label "$LABEL"
+ ./rebar3 cover
- name: Check results
if: always() && (steps.ct.outcome != 'skipped' || steps.ct2.outcome != 'skipped')
@@ -217,11 +193,11 @@ jobs:
find logs/ -name exunit.log -exec cat '{}' ';'
- name: Send to coveralls
- if: matrix.otp == 24
+ if: matrix.otp == 25
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
- DIAGNOSTIC=1 rebar3 as test coveralls send
+ DIAGNOSTIC=1 ./rebar3 as test coveralls send
curl -v -k https://coveralls.io/webhook \
--header "Content-Type: application/json" \
--data '{"repo_name":"$GITHUB_REPOSITORY",