From b0dafe1a89b8f2e8a2b999e460a8e2956c40274f Mon Sep 17 00:00:00 2001 From: Christian Garbs Date: Sat, 16 Dec 2023 22:44:01 +0100 Subject: [PATCH] switch CI pipeline from TravisCI to GitHub Actions --- .github/workflows/script-tests.yml | 26 ++++++++++++++++++++++++++ .travis.yml | 9 --------- Makefile | 4 ++-- 3 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/script-tests.yml delete mode 100644 .travis.yml 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: