From 10ea964968a73234f78eb79385d89b8581bd4683 Mon Sep 17 00:00:00 2001 From: James Raspass Date: Mon, 12 Feb 2024 02:59:40 +0000 Subject: [PATCH] Replace Travis CI with GitHub Actions --- .github/workflows/test.yml | 75 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 73 ------------------------------------- 2 files changed, 75 insertions(+), 73 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..0eeb3c15 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,75 @@ +name: Test + +on: + pull_request: + branches: + - master + push: + branches: + - master + +jobs: + build: + strategy: + fail-fast: false + matrix: + perl: [ + # Not all of ours deps support these versions. See #193. + # '5.8', '5.10', '5.12', + + '5.14', '5.16', '5.18', + '5.20', '5.22', '5.24', '5.26', '5.28', + '5.30', '5.32', '5.34', '5.36', '5.38', + ] + + runs-on: ubuntu-latest + + name: ${{ matrix.perl }} + + # 4 CPUs as per https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories + env: + HARNESS_OPTIONS: j4 + HARNESS_TIMER: 1 + + steps: + - uses: actions/checkout@v4 + + - uses: shogo82148/actions-setup-perl@v1 + with: + perl-version: ${{ matrix.perl }} + + # Bump EU:MM on 5.14 to fix MYMETA generation. + - run: cpanm --notest --skip-satisfied ExtUtils::MakeMaker~6.57_07 + + - run: cpanm --notest --skip-satisfied --installdeps --with-develop . + - run: cpanm --notest --skip-satisfied Test2::Harness + + - run: yath test t xt + + # Test high-profile reverse deps, taken from from Task::Catalyst): + # (note: currently skipping DBIC deps for speed) + - run: make install + + # Pure author deps (of reverse deps): + - run: cpanm --notest --skip-satisfied YAML::Syck + - run: cpanm --notest Carp::Assert::More@1.16 + - run: cpanm --notest Test::WWW::Mechanize@1.50 + + # Both author deps & reverse deps: + - run: cpanm --skip-satisfied Catalyst::View::TT || ( cat ~/.cpanm/build.log; false ) + - run: cpanm --skip-satisfied Catalyst::Plugin::Authentication || ( cat ~/.cpanm/build.log; false ) + + # Pure reverse deps (call with --test-only): + - run: cpanm --test-only -v Catalyst::Devel + - run: cpanm --test-only -v Catalyst::Action::REST + - run: cpanm --test-only -v Catalyst::Component::InstancePerContext + - run: cpanm --test-only -v Catalyst::Plugin::Session + - run: cpanm --test-only -v Catalyst::Plugin::Session::State::Cookie + - run: cpanm --test-only -v Catalyst::Plugin::Static::Simple + - run: cpanm --test-only -v Catalyst::Plugin::ConfigLoader + - run: cpanm --test-only -v Catalyst::Authentication::Credential::HTTP + - run: cpanm --test-only -v Catalyst::View::Email + + # Racey under parallel testing. + - run: HARNESS_OPTIONS= cpanm --test-only -v Catalyst::Plugin::Session::Store::File + - run: HARNESS_OPTIONS= cpanm --test-only -v Catalyst::Plugin::I18N diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4fbb56ff..00000000 --- a/.travis.yml +++ /dev/null @@ -1,73 +0,0 @@ -language: perl -sudo: false -perl: - - "blead" # builds perl from git - - "dev" # latest point release - - "5.28" - - "5.26" - - "5.24" - - "5.22" - - "5.20" - - "5.18" - - "5.16" - - "5.14" - - "5.12" - - "5.10" - - "5.8" -matrix: - allow_failures: - - perl: blead - - perl: dev - -before_install: - - eval $(curl https://travis-perl.github.io/init) --perl - - $HELPERS_ROOT/bin/cpan-config -install: - - build-dist - - cd $BUILD_DIR - - cpanm -q --showdeps --with-develop . | grep -v "^perl[~@]" | AUTHOR_TESTING=0 cpanm --notest --metacpan --skip-satisfied - - - test_run='make test' - - AUTHOR_TESTING=0 cpanm --notest --metacpan --skip-satisfied Test2::Harness && test_run='yath test t xt' || true - - # enable various test options, including parallel testing - - export AUTOMATED_TESTING=1 HARNESS_OPTIONS=j10:c HARNESS_TIMER=1 - - # we want these for our tests, but not for any others - - export AUTHOR_TESTING=1 - - export RELEASE_TESTING=1 - - export PERL_AUTOINSTALL=--skip - -script: - - make && $test_run - - # Test reverse deps (high-profile modules, taken from from Task::Catalyst): - # (note: currently skipping DBIC deps for speed) - - make install - - - export AUTHOR_TESTING=0 - - export RELEASE_TESTING=0 - - # pure author deps (of reverse deps): - - cpanm --notest --metacpan --skip-satisfied YAML::Syck - - cpanm --notest --metacpan Carp::Assert::More@1.16 - - cpanm --notest --metacpan Test::WWW::Mechanize@1.50 - - # both author deps & reverse deps: - - cpanm --metacpan --skip-satisfied Catalyst::View::TT || ( cat ~/.cpanm/build.log; false ) - - cpanm --metacpan --skip-satisfied Catalyst::Plugin::Authentication || ( cat ~/.cpanm/build.log; false ) - - # pure reverse deps (call with --test-only): - - cpanm --test-only --metacpan -v Catalyst::Devel - - cpanm --test-only --metacpan -v Catalyst::Action::REST - - cpanm --test-only --metacpan -v Catalyst::Component::InstancePerContext - - cpanm --test-only --metacpan -v Catalyst::Plugin::Session - - cpanm --test-only --metacpan -v Catalyst::Plugin::Session::State::Cookie - - cpanm --test-only --metacpan -v Catalyst::Plugin::Static::Simple - - cpanm --test-only --metacpan -v Catalyst::Plugin::ConfigLoader - #- cpanm --test-only --verbose --metacpan Catalyst::Authentication::Credential::HTTP - - # Still need to figure out why these fail in travis: - #- cpanm --test-only --metacpan -v Catalyst::View::Email - #- cpanm --test-only --metacpan -v Catalyst::Plugin::Session::Store::File - #- cpanm --test-only --metacpan -v Catalyst::Plugin::I18N