-
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.
We stopped using Travis CI some time ago, but never replaced it. Set up GitHub actions for automated CI build and pushing new versions to rubygems.
- Loading branch information
1 parent
273d196
commit ed7b2ce
Showing
5 changed files
with
62 additions
and
28 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,24 @@ | ||
name: Publish Gem | ||
|
||
on: | ||
release: | ||
types: | ||
- "created" | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Publish to RubyGems | ||
run: | | ||
mkdir -p $HOME/.gem | ||
touch $HOME/.gem/credentials | ||
chmod 0600 $HOME/.gem/credentials | ||
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials | ||
gem build sinject.gemspec | ||
gem push sinject-*.gem | ||
env: | ||
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}" |
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,32 @@ | ||
name: CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# All the (nominally) supported Ruby versions | ||
ruby: ['2.5', '2.6', '2.7', '3.0', '3.2', '3.3'] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
|
||
- name: Run tests | ||
run: bundle exec rspec | ||
|
||
- name: Upload Coverage Report to CodeClimate | ||
# No sense uploading coverage for each Ruby version tested | ||
if: ${{matrix.ruby == '3.3'}} | ||
uses: paambaati/codeclimate-action@v5 | ||
env: | ||
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} |
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
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