forked from jsonapi-serializer/jsonapi-serializer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update publishing instructions and add GitHub testing
- Loading branch information
Tate Thurston
committed
Jul 1, 2024
1 parent
1e966e7
commit 312d898
Showing
6 changed files
with
54 additions
and
71 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,41 @@ | ||
name: CI | ||
name: Test | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: | ||
# - master | ||
pull_request: | ||
|
||
jobs: | ||
tests: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: [2.4, 2.7, '3.0', 3.1, 3.2, truffleruby-head] | ||
ruby: [2.7, 3.0, 3.1, 3.2, 3.3] | ||
name: Ruby ${{ matrix.ruby }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- run: | | ||
bundle exec rake test | ||
env: | ||
RAILS_ENV: test | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Sets up the Ruby version | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
|
||
- name: Sets up the environment | ||
run: | | ||
sudo apt-get install libsqlite3-dev | ||
- name: Install legacy bundler for Ruby 2.4 | ||
if: ${{ matrix.ruby == 2.4 }} | ||
run: | | ||
gem install -q bundler -v 2.3.26 | ||
- name: Install bundler 2.4+ for modern Rubies | ||
if: ${{ matrix.ruby != 2.4 }} | ||
run: | | ||
gem install -q bundler | ||
- name: Run bundle install | ||
run: | | ||
bundle install | ||
- name: Sets up the Ruby version | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
|
||
- name: Runs code QA and tests | ||
run: bundle exec rake | ||
|
||
- name: Publish to Rubygems | ||
continue-on-error: true | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
run: | | ||
mkdir -p $HOME/.gem | ||
touch $HOME/.gem/credentials | ||
chmod 0600 $HOME/.gem/credentials | ||
printf -- "---\n:rubygems_api_key: Bearer ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials | ||
gem build *.gemspec | ||
gem push *.gem | ||
env: | ||
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}} | ||
run: bundle exec rake spec |
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 |
---|---|---|
|
@@ -46,3 +46,5 @@ Gemfile.lock | |
|
||
# Gem builds | ||
/*.gem | ||
|
||
pkg |
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