update tests action new messages and logic
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: circleci/ruby:2.4.1
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Call GitHub Releases API
|
||||
command: |
|
||||
cd /home/circleci/project
|
||||
TAG=$(git tag -l | grep -E '^2\.[0-9]{6}' | sort -gr | head -n1 | sed -E 's/\.[0-9]{3}$//')
|
||||
if [ ! -z "$TAG" ]; then
|
||||
for url in $(echo $RELEASE_INJECTION | sed "s/,/ /g"); do
|
||||
curl -sL -X POST -H "Content-Type: application/json" \
|
||||
-u "$ACCESS_TOKEN" \
|
||||
--data "{\"tag_name\": \"$TAG\", \
|
||||
\"target_commitish\": \"master\", \
|
||||
\"name\": \"Netdisco $TAG\"}" \
|
||||
$url
|
||||
done
|
||||
fi
|
||||
@@ -11,7 +11,7 @@ on:
|
||||
- master
|
||||
jobs:
|
||||
test_netdisco:
|
||||
name: Test Netdisco Job
|
||||
name: Run Netdisco Test Suite
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: 'netdisco/netdisco:latest-do'
|
||||
@@ -34,33 +34,33 @@ jobs:
|
||||
run: chown -R netdisco:netdisco /github/workspace/netdisco/netdisco
|
||||
- name: Install Perl deps
|
||||
run: sudo -u netdisco /home/netdisco/bin/localenv cpanm --notest Env::Path Test::Compile
|
||||
- name: Setup tmate session
|
||||
uses: mxschmitt/action-tmate@v3
|
||||
with:
|
||||
sudo: true
|
||||
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
|
||||
- name: Run Tests
|
||||
id: build_and_run_tests
|
||||
run: |
|
||||
sudo -u netdisco /home/netdisco/bin/localenv perl ./Build.PL
|
||||
sudo -u netdisco /home/netdisco/bin/localenv ./Build test --test_files xt/
|
||||
working-directory: /github/workspace/netdisco/netdisco
|
||||
continue-on-error: true
|
||||
- name: IRC failure notification
|
||||
uses: Gottox/irc-message-action@v2
|
||||
if: ${{ always() && failure() }}
|
||||
if: (! github.event.inputs.debug_enabled) && (steps.build_and_run_tests.outcome == 'failure')
|
||||
with:
|
||||
channel: '#netdisco'
|
||||
nickname: github-actions
|
||||
message: |-
|
||||
😭 ${{ github.actor }} pushed to ${{ steps.get_tag.outputs.TAGVALUE }} on repo:${{ github.repository }} but the TESTS FAILED!
|
||||
😭 https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
😭 https://github.com/netdisco/netdisco/commit/${{ github.sha }}
|
||||
🤖 ${{ github.actor }} pushed to ${{ steps.get_tag.outputs.TAGVALUE }}: https://github.com/netdisco/netdisco/commit/${{ github.sha }}
|
||||
😭 TESTS have FAILED! 👀 https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
- name: IRC success notification
|
||||
uses: Gottox/irc-message-action@v2
|
||||
if: ${{ always() && success() }}
|
||||
if: (! github.event.inputs.debug_enabled) && (steps.build_and_run_tests.outcome == 'success')
|
||||
with:
|
||||
channel: '#netdisco'
|
||||
nickname: github-actions
|
||||
message: |-
|
||||
🎉 ${{ github.actor }} pushed to ${{ steps.get_tag.outputs.TAGVALUE }} on repo:${{ github.repository }} and the TESTS PASSED!
|
||||
🎉 https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
🎉 https://github.com/netdisco/netdisco/commit/${{ github.sha }}
|
||||
🤖 ${{ github.actor }} pushed to ${{ steps.get_tag.outputs.TAGVALUE }}: https://github.com/netdisco/netdisco/commit/${{ github.sha }} (tests PASSED)
|
||||
- name: Setup tmate session
|
||||
uses: mxschmitt/action-tmate@v3
|
||||
if: always() && github.event.inputs.debug_enabled && (github.event_name == 'workflow_dispatch')
|
||||
with:
|
||||
sudo: true
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
language: perl
|
||||
perl:
|
||||
- "5.30"
|
||||
- "5.10"
|
||||
os: linux
|
||||
dist: trusty
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsnmp-dev
|
||||
- phantomjs
|
||||
- graphviz
|
||||
hosts:
|
||||
- localhost
|
||||
branches:
|
||||
only:
|
||||
- /^2\.\d{6}$/
|
||||
- 'master'
|
||||
- /.*travis.*/
|
||||
install:
|
||||
- cpanm --quiet --notest https://github.com/egiles/test-compile/archive/v2.1.2.tar.gz PkgConfig Test::CChecker Alien::zlib::Static Alien::OpenSSL::Static Alien::SNMP
|
||||
script: |
|
||||
perl Build.PL && \
|
||||
./Build && \
|
||||
PERL_MM_USE_DEFAULT=1 ./Build installdeps --cpan_client 'cpanm --quiet --notest' && \
|
||||
ND_PHANTOMJS=/usr/bin/phantomjs ./Build test --test_files xt/
|
||||
notifications:
|
||||
irc:
|
||||
on_success: always
|
||||
on_failure: always
|
||||
channels:
|
||||
- 'irc.libera.chat#netdisco'
|
||||
# email:
|
||||
# on_success: always
|
||||
# on_failure: always
|
||||
# recipients:
|
||||
# - 'netdisco-ng-commit@lists.sourceforge.net'
|
||||
Reference in New Issue
Block a user