-
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.
- Loading branch information
Showing
1 changed file
with
13 additions
and
120 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 |
---|---|---|
@@ -1,135 +1,28 @@ | ||
name: Linting | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6 | ||
with: | ||
ruby-version: 2.6 | ||
- run: bundle install | ||
- name: Rubocop | ||
run: rubocop | ||
|
||
name: Ruby CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
name: Ruby ${{ matrix.ruby }} | ||
strategy: | ||
matrix: | ||
ruby-version: ['3.1', '3.0', '2.6'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true | ||
- name: Install dependencies | ||
run: bundle install | ||
- name: Run tests | ||
run: bundle exec rake | ||
|
||
build: | ||
rubocop: | ||
runs-on: ubuntu-latest | ||
name: Ruby ${{ matrix.ruby }} | ||
strategy: | ||
matrix: | ||
ruby: ['3.1', '3.0', '2.6'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- name: Run the default task | ||
run: bundle exec rake | ||
|
||
name: Matrix Testing | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
- uses: actions/checkout@v3 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.2.1" | ||
bundler-cache: true | ||
- run: bundle exec rubocop | ||
test: | ||
runs-on: ${{ matrix.os }}-latest | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu, macos] | ||
ruby: [2.5, 2.6, 2.7, head, debug, jruby, jruby-head, truffleruby, truffleruby-head] | ||
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }} | ||
ruby: ["2.6.10", "2.7.7", "3.0.5", "3.1.3", "3.2.1"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
- run: bundle install | ||
- run: bundle exec rake | ||
|
||
name: Ruby Gem | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
name: Build + Publish | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Ruby 2.6 | ||
uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6 | ||
with: | ||
ruby-version: 2.6 | ||
- run: bundle install | ||
|
||
- name: Publish to GPR | ||
run: | | ||
mkdir -p $HOME/.gem | ||
touch $HOME/.gem/credentials | ||
chmod 0600 $HOME/.gem/credentials | ||
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials | ||
gem build *.gemspec | ||
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem | ||
env: | ||
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}" | ||
OWNER: ${{ github.repository_owner }} | ||
|
||
- 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 *.gemspec | ||
gem push *.gem | ||
env: | ||
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}" | ||
bundler-cache: true | ||
- run: bundle exec rake test |