From 09122a3daef06cb9fb5afb7d31856d9cab818315 Mon Sep 17 00:00:00 2001 From: colorbox Date: Sat, 4 Feb 2023 04:12:59 +0900 Subject: [PATCH] migrate CI build from travis to GitHub Actions (#507) This PR migrate a CI build from Travis to GitHub Actions. closes: #504 --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++++ .travis.yml | 20 -------------------- README.md | 2 +- 3 files changed, 33 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..5cdeae64 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: test on CI +on: + push: + branches: [ master ] + pull_request: +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + ruby: [ "2.0", "2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "head" ] + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - name: Run tests + run: bundle exec rake test:units + + rubocop: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: "2.7" + bundler-cache: true + - name: Run rubocop + run: bundle exec rake lint diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ec4ca595..00000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: ruby -rvm: - - 3.0 - - 2.7 - - 2.6 - - 2.5 - - 2.4 - - 2.3 - - 2.2 - - 2.1 - - 2.0 -branches: - only: - - master -matrix: - include: - # Run Danger only once, on 2.5 - - rvm: 2.5 - script: bundle exec danger -script: bundle exec rake test:units lint diff --git a/README.md b/README.md index 5c4dacef..31f16d16 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ more servers. [![Gem Version](https://badge.fury.io/rb/sshkit.svg)](https://rubygems.org/gems/sshkit) -[![Build Status](https://travis-ci.org/capistrano/sshkit.svg?branch=master)](https://travis-ci.org/capistrano/sshkit) +[![Build Status](https://github.com/capistrano/sshkit/actions/workflows/ci.yml/badge.svg)](https://github.com/capistrano/sshkit/actions/workflows/ci.yml) ## Example