-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Replace Travis with GitHub Actions.
Update gems to satisfy dependabot.
- Loading branch information
1 parent
f5936a2
commit ccbe72c
Showing
6 changed files
with
163 additions
and
96 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,68 @@ | ||
name: Pipeline | ||
on: push | ||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Install Ruby and gems | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
- name: Run code checks | ||
run: bundle exec rubocop | ||
test: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: [2.6.8, 2.7.5, 3.0.4] | ||
rails: [6.0.6, 6.1.4, 7.0.4] | ||
exclude: | ||
- ruby: 2.6.8 | ||
rails: 7.0.4 | ||
env: | ||
RAILS_VERSION: ${{ matrix.rails }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Remove `Gemfile.lock` because this is a matrix job | ||
run: rm Gemfile.lock | ||
- name: Install Ruby and gems | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- name: Execute migrations | ||
run: bin/rails db:migrate | ||
- name: Run tests | ||
run: BACKTRACE=1 bin/rails test | ||
- name: Check if coverage LCOV file exists | ||
id: lcov_exists | ||
uses: andstor/file-existence-action@v2 | ||
with: | ||
files: coverage/lcov.info | ||
- name: Submit coverage to `coveralls.io` if LCOV file exists | ||
uses: coverallsapp/github-action@master | ||
if: steps.lcov_exists.outputs.files_exists == 'true' | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
release: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Install Ruby | ||
uses: ruby/setup-ruby@v1 | ||
- name: Build the gem | ||
run: gem build rest_framework.gemspec -o rest_framework.gem | ||
- name: Push to RubyGems | ||
env: | ||
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} | ||
run: ls -lah | ||
|
||
# gem push rest_framework.gem |
File renamed without changes.
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
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
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
class RESTFramework::Engine < ::Rails::Engine | ||
class RESTFramework::Engine < Rails::Engine | ||
end |
Oops, something went wrong.