diff --git a/.github/workflows/script-tests.yml b/.github/workflows/script-tests.yml new file mode 100644 index 0000000..2ef8ce0 --- /dev/null +++ b/.github/workflows/script-tests.yml @@ -0,0 +1,26 @@ +--- +name: tests +on: + push: + pull_request: + types: [opened] + schedule: + - cron: '16 19 27 * *' + +jobs: + test-scripts: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ['ubuntu-latest'] + perl: ['5.36'] + name: Perl ${{ matrix.perl }} on ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Set up perl + uses: shogo82148/actions-setup-perl@v1 + with: + perl-version: ${{ matrix.perl }} + - run: perl -V + - run: make ci-install-deps + - run: make test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e36cbab..0000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: perl - -perl: - # newer Perl -> fewer dependencies to install for the Perl modules -> faster - - "5.22" - -install: make travis-install-deps - -script: make test diff --git a/Makefile b/Makefile index 858583a..851d0b5 100644 --- a/Makefile +++ b/Makefile @@ -14,9 +14,9 @@ clean: test: test-perl test-bash -travis-install-deps: travis-install-perl-deps +ci-install-deps: ci-install-perl-deps -travis-install-perl-deps: +ci-install-perl-deps: @grep ^use $(PERL_SOURCES) | awk '{print $$2}' | sed 's/;$$//' | egrep -v '^(strict|warnings)$$' | sort | uniq | while read MOD; do perl -Itest/ -M"$$MOD" -e '1;' 2>/dev/null || echo "$$MOD" ; done | cpanm --skip-satisfied test-perl: diff --git a/README.md b/README.md index 242560c..27d343a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ my rrd statistic scripts ======================== +[![Build status](https://github.com/mmitch/rrd/workflows/tests/badge.svg?branch=master)](https://github.com/mmitch/rrd/actions?query=workflow%3Atests) [![GPL 3+](https://img.shields.io/badge/license-GPL%203%2B-blue.svg)](http://www.gnu.org/licenses/gpl-3.0-standalone.html) This is a collection of scripts that draw some nice graphs with