diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..258a9ac --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +--- +name: ci + +on: + push: + branches: [master] + pull_request: + branches: [master] + workflow_dispatch: + schedule: + - cron: '35 4 * * 4' # weekly on thursday morning + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: + - '2.5' + - '2.6' + - '2.7' + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby ${{ matrix.ruby-version }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + - name: Install dependencies + run: | + bundle + - name: Test + run: | + bundle exec rake ci diff --git a/.travis.yml b/.travis.yml index 4853706..c4df666 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,4 +7,4 @@ rvm: - 2.5 script: -- bundle exec rake travis +- bundle exec rake ci diff --git a/README.md b/README.md index 90fe1f6..909f5e0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # openvpn-status-web -[![Build Status](https://travis-ci.com/cmur2/openvpn-status-web.svg?branch=master)](https://travis-ci.com/cmur2/openvpn-status-web) [![Depfu](https://badges.depfu.com/badges/c264e2f70f2a19c43f880ddcb4a12ba8/overview.svg)](https://depfu.com/github/cmur2/openvpn-status-web?project_id=6194) +[![Build Status](https://travis-ci.com/cmur2/openvpn-status-web.svg?branch=master)](https://travis-ci.com/cmur2/openvpn-status-web) ![ci](https://github.com/cmur2/openvpn-status-web/workflows/ci/badge.svg) [![Depfu](https://badges.depfu.com/badges/c264e2f70f2a19c43f880ddcb4a12ba8/overview.svg)](https://depfu.com/github/cmur2/openvpn-status-web?project_id=6194) ## Description diff --git a/Rakefile b/Rakefile index 9d06eec..285e318 100644 --- a/Rakefile +++ b/Rakefile @@ -21,4 +21,4 @@ end task default: [:rubocop, :spec, 'bundle:audit'] -task travis: [:default, :'solargraph:init', :'solargraph:tc'] +task ci: [:default, :'solargraph:init', :'solargraph:tc']