-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Move the CI from Travis CI to GitHub Actions (#118)
Travis does not provide free CI for open source projects anymore. So we need to use another solution.
- Loading branch information
1 parent
97eb97b
commit 0059d02
Showing
3 changed files
with
71 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
schedule: | ||
- cron: '15 3 * * 1' | ||
jobs: | ||
static-analysis: | ||
name: 'Static analysis' | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: 'Set up Ruby' | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.0.0' | ||
- name: 'Check the environment' | ||
run: | | ||
ruby --version | ||
gem --version | ||
- name: 'Install bundler' | ||
run: | | ||
gem install bundler | ||
bundle --version | ||
- name: 'Install gems' | ||
run: 'bundle install --jobs 4 --retry 3' | ||
- name: 'Run RuboCop' | ||
run: | | ||
bundle exec rubocop Gemfile \ | ||
gemfiles/Gemfile.rails-5.2 gemfiles/Gemfile.rails-6.0 \ | ||
gemfiles/Gemfile.rails-6.1 lib/ test/ Rakefile | ||
test: | ||
name: "Tests: Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }}" | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: 'Set up Ruby' | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: '${{ matrix.ruby }}' | ||
- name: 'Check the environment' | ||
run: | | ||
ruby --version | ||
gem --version | ||
- name: 'Install bundler' | ||
run: | | ||
gem install bundler | ||
bundle --version | ||
- name: 'Install gems' | ||
env: | ||
MATRIX_RAILS_VERSION: ${{ matrix.rails }} | ||
run: | | ||
export BUNDLE_GEMFILE="${GITHUB_WORKSPACE}/gemfiles/Gemfile.rails-${MATRIX_RAILS_VERSION}" | ||
bundle install --jobs 4 --retry 3 | ||
- name: 'Run the tests' | ||
run: 'bundle exec rake --trace test' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: | ||
- '2.5.8' | ||
- '2.6.6' | ||
- '2.7.2' | ||
rails: | ||
- '5.2' | ||
- '6.0' | ||
- '6.1' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters