summaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2021-12-13 15:32:26 +0100
committerBadlop <badlop@process-one.net>2021-12-23 16:39:36 +0100
commit8ccad7fadadc7ccedc4a4c9004838503d0f1c76d (patch)
tree4795435c6f0f295f02cd2652916f9ae1974e8369 /.github/workflows/ci.yml
parentCheck dialyzer results in its step when using rebar 2 (diff)
Publish CT logs and Cover on failure to an external GH Pages repo
Diffstat (limited to '')
-rw-r--r--.github/workflows/ci.yml41
1 files changed, 40 insertions, 1 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b98ba24e..8cd9a38c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -112,6 +112,14 @@ jobs:
~/.cache/rebar3/
key: ${{matrix.otp}}-${{matrix.rebar}}-${{hashFiles('rebar.config')}}
+ - name: Download test logs
+ if: matrix.otp == 24 && github.repository == 'processone/ejabberd'
+ continue-on-error: true
+ run: |
+ mkdir -p _build/test
+ curl -sSL https://github.com/processone/ecil/tarball/gh-pages |
+ tar -C _build/test --strip-components=1 --wildcards -xzf -
+ rm -rf _build/test/logs/last/
- name: Compile
run: |
@@ -134,7 +142,22 @@ jobs:
make dialyzer
[ ${{ matrix.rebar }} = 3 ] && true \
|| { cat dialyzer/error.log ; test ! -s dialyzer/error.log ; }
- - run: make test
+
+ - name: Run tests
+ if: matrix.otp != 24
+ run: make test
+ - name: Run tests (OTP 24)
+ if: matrix.otp == 24
+ id: ct
+ run: |
+ (cd priv && ln -sf ../sql)
+ COMMIT=`echo $GITHUB_SHA | cut -c 1-7`
+ DATE=`date +%s`
+ 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
- name: Check results
if: always()
@@ -166,6 +189,22 @@ jobs:
"payload":{"build_num":$GITHUB_RUN_ID,
"status":"done"}}'
+ - name: Upload test logs
+ if: always() && steps.ct.outcome == 'failure' && github.repository == 'processone/ejabberd'
+ uses: peaceiris/actions-gh-pages@v3
+ with:
+ publish_dir: _build/test
+ exclude_assets: '.github,lib,plugins'
+ external_repository: processone/ecil
+ deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
+ keep_files: true
+
+ - name: View ECIL address
+ if: always() && steps.ct.outcome == 'failure' && github.repository == 'processone/ejabberd'
+ run: |
+ CTRUN=`ls -la _build/test/logs/last | sed 's|.*-> ||'`
+ echo "::notice::View CT results: https://processone.github.io/ecil/logs/$CTRUN/"
+
- name: Prepare new schema
run: |
[[ -d logs ]] && rm -rf logs