generated from ParadoxV5/template-ruby-gem
-
-
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
0 parents
commit 6efd39c
Showing
15 changed files
with
229 additions
and
0 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,23 @@ | ||
version: 2 | ||
updates: | ||
|
||
- package-ecosystem: github-actions | ||
directory: / | ||
ignore: | ||
- update-types: [version-update:semver-minor, version-update:semver-patch] | ||
dependency-name: '*' | ||
schedule: | ||
interval: monthly | ||
|
||
- package-ecosystem: bundler | ||
directory: / | ||
ignore: | ||
- update-types: [version-update:semver-patch] | ||
dependency-name: '*' | ||
schedule: | ||
interval: weekly | ||
# | ||
#- package-ecosystem: gitsubmodule | ||
# directory: / | ||
# schedule: | ||
# interval: weekly |
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,43 @@ | ||
name: Generate Documentation with YARD | ||
on: | ||
push: | ||
branches: [main] | ||
paths: [.github/workflows/documentation.yml, lib/**, README.md] | ||
concurrency: | ||
group: pages | ||
cancel-in-progress: true | ||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 2 | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: actions/configure-pages@v3 | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3' | ||
bundler-cache: true | ||
|
||
- name: Package YARD | ||
run: bundle exec yard doc | ||
|
||
- uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: doc | ||
|
||
deploy: | ||
needs: build | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deploy-pages.outputs.page_url }} | ||
permissions: write-all | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: deploy-pages | ||
uses: actions/deploy-pages@v2 |
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,23 @@ | ||
name: Package with RubyGems | ||
on: {release: {types: [published]}} | ||
jobs: | ||
package: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 2 | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3' | ||
|
||
- name: Package Gem | ||
run: gem build --output .gem *.gemspec | ||
|
||
- name: Publish to RubyGems | ||
run: gem push .gem | ||
env: | ||
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }} |
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,29 @@ | ||
name: Test with Minitest | ||
on: | ||
push: | ||
paths: [.github/workflows/test.yml, lib/**, test/**, Gemfile, '*.gemspec'] | ||
pull_request: | ||
paths: [.github/workflows/test.yml, lib/**, test/**, Gemfile, '*.gemspec'] | ||
jobs: | ||
|
||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
ruby-version: ['3', '3.0'] | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 5 | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true | ||
|
||
- name: Test with Minitest | ||
run: bundle exec rake test:isolated |
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,27 @@ | ||
name: Check Types with Steep | ||
on: | ||
push: | ||
paths: [.github/workflows/type_check.yml, lib/**, sig/**, Gemfile, '*.gemspec'] | ||
pull_request: | ||
paths: [.github/workflows/type_check.yml, lib/**, sig/**, Gemfile, '*.gemspec'] | ||
jobs: | ||
|
||
type_check: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3' | ||
bundler-cache: true | ||
|
||
- name: Collect RBS | ||
run: bundle exec rbs collection install | ||
|
||
- name: Check Types with Steep | ||
run: bundle exec steep check |
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,7 @@ | ||
# JetBrains | ||
/.idea/ | ||
|
||
# Ruby | ||
/.gem_rbs_collection/ | ||
/Gemfile.lock | ||
/rbs_collection.lock.yaml |
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 @@ | ||
--markup markdown --markup-provider commonmarker |
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,19 @@ | ||
# frozen_string_literal: true | ||
source 'https://rubygems.org' | ||
gemspec | ||
|
||
# Development Apps | ||
group :development do | ||
group :type_check do | ||
gem 'rbs', '~> 3.1.0', require: false | ||
gem 'steep', '~> 1.5.0', require: false | ||
end | ||
group :documentation do | ||
gem 'yard', '~> 0.9.0', require: false | ||
gem 'commonmarker', '~> 0.23.0', require: false | ||
end | ||
group :test do | ||
gem 'rake', '~> 13.0.0' | ||
gem 'minitest', '~> 5.19.0' | ||
end | ||
end |
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,9 @@ | ||
require 'minitest/test_task' | ||
# Create the following tasks: | ||
# * test : run tests | ||
# * test:cmd : print the testing command | ||
# * test:isolated : run tests independently to surface order dependencies | ||
# * test:deps : (alias of test:isolated) | ||
# * test:slow : run tests and reports the slowest 25 | ||
# Also makes the default task depend on the test task (https://github.com/minitest/minitest/issues/958) | ||
Minitest::TestTask.create |
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,4 @@ | ||
target :lib do | ||
check 'lib' | ||
signature 'sig' | ||
end |
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 @@ | ||
require_relative 'mygem/version' |
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,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module MyGem | ||
VERSION = '0.0.0' | ||
end |
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,28 @@ | ||
# frozen_string_literal: true | ||
require_relative 'lib/mygem/version' | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'mygem' | ||
spec.summary = '' | ||
spec.version = MyGem::VERSION | ||
spec.author = 'ParadoxV5' | ||
spec.license = '' | ||
|
||
github_account = spec.author | ||
github = File.join 'https://github.com', github_account, spec.name | ||
spec.homepage = github | ||
spec.metadata = { | ||
'homepage_uri' => spec.homepage, | ||
'source_code_uri' => github, | ||
'changelog_uri' => File.join(github, 'releases'), | ||
'bug_tracker_uri' => File.join(github, 'issues'), | ||
'wiki_uri' => File.join(github, 'wiki'), | ||
'funding_uri' => File.join('https://github.com/sponsors', github_account), | ||
'documentation_uri' => File.join('https://rubydoc.info/gems', spec.name) | ||
} | ||
|
||
spec.files = Dir['**/*'] | ||
|
||
spec.required_ruby_version = '>= 3' | ||
#spec.add_dependency 'dependent_gem', '~> 2.1.0' | ||
end |
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,7 @@ | ||
path: .gem_rbs_collection | ||
|
||
sources: | ||
- name: ruby/gem_rbs_collection | ||
remote: https://github.com/ruby/gem_rbs_collection.git | ||
revision: main | ||
repo_dir: gems |
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,3 @@ | ||
module MyGem | ||
VERSION: String | ||
end |