From 38410974289f4ce046cb3865abe1bdcc0a3a95fd Mon Sep 17 00:00:00 2001 From: Badlop Date: Mon, 13 Dec 2021 15:30:20 +0100 Subject: [PATCH] Clean actions steps, remove redundant ones --- .github/workflows/ci.yml | 59 ++++++++++------------------------------ 1 file changed, 15 insertions(+), 44 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b5a9c69c..c05c6f5c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,7 +89,6 @@ jobs: libsqlite3-dev libwebp-dev libyaml-dev - name: Prepare rebar - id: rebar run: | echo '{xref_ignores, [{eldap_filter_yecc, return_error, 2} ]}.' >>rebar.config @@ -101,23 +100,18 @@ jobs: mqtree, p1_acme, p1_mysql, p1_oauth2, p1_pgsql, p1_utils, pkix, sqlite3, stringprep, stun, xmpp, yconf]} ]}.' >>rebar.config echo '{ct_extra_params, "-verbosity 20"}.' >>rebar.config + echo "{ct_opts, [{verbosity, 20}, {keep_logs, 20}]}." >>rebar.config - - name: Cache rebar2 - if: matrix.rebar == 2 + - name: Cache rebar uses: actions/cache@v2 with: path: | deps/ dialyzer/ ebin/ + ~/.cache/rebar3/ key: ${{matrix.otp}}-${{matrix.rebar}}-${{hashFiles('rebar.config')}} - - name: Cache rebar3 - if: matrix.rebar == 3 - uses: actions/cache@v2 - with: - path: ~/.cache/rebar3/ - key: ${{matrix.otp}}-${{matrix.rebar}}-${{hashFiles('rebar.config')}} - name: Compile run: | @@ -151,28 +145,13 @@ jobs: grep -q 'TEST COMPLETE,.* 0 failed' logs/suite.log test $(find logs/ -empty -name error.log) - - name: View dialyzer report - run: cat logs/dialyzer.log - - - name: View full suite.log - run: cat logs/suite.log - - - name: View suite.log failures + - name: View logs failures if: failure() - run: cat logs/suite.log | awk - 'BEGIN{RS="\n=case";FS="\n"} /=result\s*failed/ {print "=case" $0}' - - - name: View full ejabberd.log - if: failure() - run: find logs/ -name ejabberd.log -exec cat '{}' ';' - - - name: View error.log - if: failure() - run: find logs/ -name error.log -exec cat '{}' ';' - - - name: View exunit.log - if: failure() - run: find logs/ -name exunit.log -exec cat '{}' ';' + run: | + cat logs/suite.log | awk \ + 'BEGIN{RS="\n=case";FS="\n"} /=result\s*failed/ {print "=case" $0}' + find logs/ -name error.log -exec cat '{}' ';' + find logs/ -name exunit.log -exec cat '{}' ';' - name: Send to coveralls if: matrix.otp == 24 @@ -218,21 +197,13 @@ jobs: grep 'TEST COMPLETE' logs/suite.log grep -q 'TEST COMPLETE,.* 0 failed' logs/suite.log test $(find logs/ -empty -name error.log) - - name: View full suite.log - run: cat logs/suite.log - - name: View suite.log failures + - name: View logs failures if: failure() - run: cat logs/suite.log | awk - 'BEGIN{RS="\n=case";FS="\n"} /=result\s*failed/ {print "=case" $0}' - - name: View full ejabberd.log - if: failure() - run: find logs/ -name ejabberd.log -exec cat '{}' ';' - - name: View error.log - if: failure() - run: find logs/ -name error.log -exec cat '{}' ';' - - name: View exunit.log - if: failure() - run: find logs/ -name exunit.log -exec cat '{}' ';' + run: | + cat logs/suite.log | awk \ + 'BEGIN{RS="\n=case";FS="\n"} /=result\s*failed/ {print "=case" $0}' + find logs/ -name error.log -exec cat '{}' ';' + find logs/ -name exunit.log -exec cat '{}' ';' binaries: name: Binaries