Skip to content

Commit

Permalink
Initialize customized/px5
Browse files Browse the repository at this point in the history
  • Loading branch information
ParadoxV5 authored Aug 13, 2023
0 parents commit 6efd39c
Show file tree
Hide file tree
Showing 15 changed files with 229 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/dependabot.yml
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
43 changes: 43 additions & 0 deletions .github/workflows/documentation.yml
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
23 changes: 23 additions & 0 deletions .github/workflows/package.yml
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 }}
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
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
27 changes: 27 additions & 0 deletions .github/workflows/type_check.yml
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
7 changes: 7 additions & 0 deletions .gitignore
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
1 change: 1 addition & 0 deletions .yardopts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--markup markdown --markup-provider commonmarker
19 changes: 19 additions & 0 deletions Gemfile
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
9 changes: 9 additions & 0 deletions Rakefile
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
4 changes: 4 additions & 0 deletions Steepfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
target :lib do
check 'lib'
signature 'sig'
end
1 change: 1 addition & 0 deletions lib/mygem.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require_relative 'mygem/version'
5 changes: 5 additions & 0 deletions lib/mygem/version.rb
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
28 changes: 28 additions & 0 deletions mygem.gemspec
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
7 changes: 7 additions & 0 deletions rbs_collection.yaml
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
3 changes: 3 additions & 0 deletions sig/mygem.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module MyGem
VERSION: String
end

0 comments on commit 6efd39c

Please sign in to comment.