-
-
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 244dfaa
Showing
48 changed files
with
1,267 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,213 @@ | ||
--- | ||
|
||
version: 2.1 | ||
|
||
defaults: &defaults | ||
working_directory: ~/ruby-on-strum-gem-name | ||
docker: | ||
- image: cimg/ruby:<< parameters.ruby-version >> | ||
|
||
orbs: | ||
ruby: circleci/[email protected] | ||
|
||
references: | ||
bundle_install: &bundle_install | ||
run: | ||
name: Installing gems | ||
command: | | ||
bundle config set --local path '~/vendor/bundle' | ||
bundle install | ||
install_linters: &install_linters | ||
run: | ||
name: Installing bunch of linters | ||
command: | | ||
curl -1sLf 'https://dl.cloudsmith.io/public/evilmartians/lefthook/setup.deb.sh' | sudo -E bash | ||
sudo apt-get update -y | ||
sudo apt-get install -y lefthook shellcheck yamllint | ||
npm install --prefix='~/.local' --global --save-dev git+https://github.com/streetsidesoftware/cspell-cli markdownlint-cli | ||
cp .circleci/linter_configs/.fasterer.yml .fasterer.yml | ||
cp .circleci/linter_configs/.lefthook.yml lefthook.yml | ||
install_codeclimate_reporter: &install_codeclimate_reporter | ||
run: | ||
name: Installing CodeClimate test reporter | ||
command: | | ||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | ||
chmod +x ./cc-test-reporter | ||
use_latest_bundler: &use_latest_bundler | ||
run: | ||
name: Using latest bundler | ||
command: gem install bundler | ||
|
||
use_latest_gemspec: &use_latest_gemspec | ||
run: | ||
name: Using latest gemspec | ||
command: cp .circleci/gemspecs/latest on_strum-gem_name.gemspec | ||
|
||
use_compatible_gemspec: &use_compatible_gemspec | ||
run: | ||
name: Using compatible gemspec | ||
command: cp .circleci/gemspecs/compatible on_strum-gem_name.gemspec | ||
|
||
jobs: | ||
linters-ruby: | ||
parameters: | ||
ruby-version: | ||
type: string | ||
|
||
<<: *defaults | ||
|
||
steps: | ||
- checkout | ||
|
||
- <<: *use_latest_bundler | ||
- <<: *use_latest_gemspec | ||
- <<: *bundle_install | ||
- <<: *install_linters | ||
|
||
- run: | ||
name: Running commit linters | ||
command: lefthook run commit-linters | ||
|
||
- run: | ||
name: Running code style linters | ||
command: lefthook run code-style-linters | ||
|
||
- run: | ||
name: Running code performance linters | ||
command: lefthook run code-performance-linters | ||
|
||
- run: | ||
name: Running code vulnerability linters | ||
command: lefthook run code-vulnerability-linters | ||
|
||
- run: | ||
name: Running code documentation linters | ||
command: lefthook run code-documentation-linters | ||
|
||
- run: | ||
name: Running release linters | ||
command: lefthook run release-linters | ||
|
||
tests-ruby: | ||
parameters: | ||
ruby-version: | ||
type: string | ||
|
||
<<: *defaults | ||
|
||
steps: | ||
- checkout | ||
|
||
- <<: *use_latest_bundler | ||
- <<: *use_latest_gemspec | ||
- <<: *bundle_install | ||
- <<: *install_codeclimate_reporter | ||
|
||
- run: | ||
name: Running RSpec | ||
command: | | ||
./cc-test-reporter before-build | ||
bundle exec rspec | ||
- run: | ||
name: Creating CodeClimate test coverage report | ||
command: | | ||
./cc-test-reporter format-coverage -t simplecov -o "coverage/codeclimate.$CIRCLE_NODE_INDEX.json" | ||
- store_artifacts: | ||
name: Saving Simplecov coverage artifacts | ||
path: ~/ruby-on-strum-gem-name/coverage | ||
destination: coverage | ||
|
||
- deploy: | ||
name: Uploading CodeClimate test coverage report | ||
command: | | ||
./cc-test-reporter sum-coverage --output - --parts $CIRCLE_NODE_TOTAL coverage/codeclimate.*.json | ./cc-test-reporter upload-coverage --debug --input - | ||
compatibility-ruby: | ||
parameters: | ||
ruby-version: | ||
type: string | ||
|
||
<<: *defaults | ||
|
||
steps: | ||
- checkout | ||
|
||
- <<: *use_compatible_gemspec | ||
|
||
- ruby/install-deps: | ||
bundler-version: "2.3.26" | ||
with-cache: false | ||
path: '~/vendor/custom_bundle' | ||
|
||
- run: | ||
name: Running compatibility tests | ||
command: bundle exec rspec | ||
|
||
rubygems-deps-ruby: | ||
parameters: | ||
ruby-version: | ||
type: string | ||
|
||
<<: *defaults | ||
|
||
steps: | ||
- checkout | ||
|
||
- run: | ||
name: Building rubygems dependencies from default gemspec on minimal Ruby version | ||
command: bundle install | ||
|
||
releasing-gem-from-ruby: | ||
parameters: | ||
ruby-version: | ||
type: string | ||
|
||
<<: *defaults | ||
|
||
steps: | ||
- checkout | ||
|
||
- add_ssh_keys: | ||
fingerprints: | ||
- "SO:ME:FIN:G:ER:PR:IN:T" | ||
|
||
- run: | ||
name: Publishing new release | ||
command: ./.circleci/scripts/release.sh | ||
|
||
workflows: | ||
build_test_deploy: | ||
jobs: | ||
- linters-ruby: | ||
matrix: | ||
parameters: | ||
ruby-version: ["3.3-node"] | ||
- tests-ruby: | ||
matrix: | ||
parameters: | ||
ruby-version: ["3.3"] | ||
- compatibility-ruby: | ||
matrix: | ||
parameters: | ||
ruby-version: ["2.5", "2.6", "2.7", "3.0", "3.1", "3.2"] | ||
- rubygems-deps-ruby: | ||
matrix: | ||
parameters: | ||
ruby-version: ["2.5"] | ||
- releasing-gem-from-ruby: | ||
requires: | ||
- linters-ruby | ||
- tests-ruby | ||
- compatibility-ruby | ||
- rubygems-deps-ruby | ||
matrix: | ||
parameters: | ||
ruby-version: ["2.5"] | ||
filters: | ||
branches: | ||
only: master |
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,21 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative 'lib/on_strum/logs/version' | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'on_strum-gem_name' | ||
spec.version = OnStrum::GemName::VERSION | ||
spec.authors = ['Vladislav Trotsenko'] | ||
spec.email = %w[[email protected]] | ||
spec.summary = %(on_strum-gem_name) | ||
spec.description = %(on_strum-gem_name description) | ||
spec.homepage = 'https://github.com/on-strum/ruby-on-strum-gem-name' | ||
spec.license = 'MIT' | ||
|
||
spec.required_ruby_version = '>= 2.5.0' | ||
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } | ||
spec.require_paths = %w[lib] | ||
|
||
spec.add_development_dependency 'rake' | ||
spec.add_development_dependency 'rspec' | ||
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,29 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative 'lib/on_strum/logs/version' | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'on_strum-gem_name' | ||
spec.version = OnStrum::GemName::VERSION | ||
spec.authors = ['Vladislav Trotsenko'] | ||
spec.email = %w[[email protected]] | ||
spec.summary = %(on_strum-gem_name) | ||
spec.description = %(on_strum-gem_name description) | ||
spec.homepage = 'https://github.com/on-strum/ruby-on-strum-gem-name' | ||
spec.license = 'MIT' | ||
|
||
spec.required_ruby_version = '>= 2.5.0' | ||
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } | ||
spec.require_paths = %w[lib] | ||
|
||
spec.add_development_dependency 'bundler-audit', '~> 0.9.1' | ||
spec.add_development_dependency 'fasterer', '~> 0.11.0' | ||
spec.add_development_dependency 'pry-byebug', '~> 3.10', '>= 3.10.1' | ||
spec.add_development_dependency 'rake', '~> 13.1' | ||
spec.add_development_dependency 'reek', '~> 6.3' | ||
spec.add_development_dependency 'rspec', '~> 3.13' | ||
spec.add_development_dependency 'rubocop', '~> 1.61' | ||
spec.add_development_dependency 'rubocop-performance', '~> 1.20', '>= 1.20.2' | ||
spec.add_development_dependency 'rubocop-rspec', '~> 2.27', '>= 2.27.1' | ||
spec.add_development_dependency 'simplecov', '~> 0.22.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,4 @@ | ||
--- | ||
|
||
ignore: | ||
- EXA-MPLE-XXXX |
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 @@ | ||
--- | ||
|
||
enableGlobDot: true | ||
|
||
patterns: | ||
- name: GithubUser | ||
pattern: /\[@.+\]/gmx | ||
|
||
languageSettings: | ||
- languageId: markdown | ||
ignoreRegExpList: | ||
- GithubUser | ||
|
||
words: | ||
- bagage | ||
- bagages | ||
- bestwebua | ||
- codebases | ||
- codeclimate | ||
- commitspell | ||
- gemspecs | ||
- lefthook | ||
- markdownlint | ||
- rubocop | ||
- simplecov | ||
- stdlib | ||
- yamlint |
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 @@ | ||
--- | ||
|
||
enableGlobDot: true | ||
|
||
patterns: | ||
- name: GithubUser | ||
pattern: /\[@.+\]/gmx | ||
- name: MarkdownCode | ||
pattern: /`{1,3}.+`{1,3}/gmx | ||
- name: MarkdownCodeBlock | ||
pattern: /^\s*```[\s\S]*?^\s*```/gmx | ||
|
||
languageSettings: | ||
- languageId: markdown | ||
ignoreRegExpList: | ||
- GithubUser | ||
- MarkdownCode | ||
- MarkdownCodeBlock | ||
|
||
words: | ||
- Commiting | ||
- Nazarov | ||
- Serhiy | ||
- Vladislav | ||
- Trotsenko | ||
- codebases | ||
- gemspecs | ||
- onStrum |
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 @@ | ||
--- | ||
|
||
exclude_paths: | ||
- '.circleci/**/*.rb' |
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,44 @@ | ||
--- | ||
|
||
no_tty: true | ||
skip_output: | ||
- meta | ||
|
||
commit-linters: | ||
commands: | ||
commitspell: | ||
run: .circleci/scripts/commitspell.sh -c '.circleci/linter_configs/.commitspell.yml' | ||
|
||
code-style-linters: | ||
commands: | ||
reek: | ||
run: bundle exec reek | ||
rubocop: | ||
run: bundle exec rubocop -c '.circleci/linter_configs/.rubocop.yml' | ||
shellcheck: | ||
glob: '*.{sh}' | ||
run: shellcheck --norc {all_files} | ||
yamllint: | ||
run: yamllint -c '.circleci/linter_configs/.yamllint.yml' . | ||
|
||
code-performance-linters: | ||
commands: | ||
fasterer: | ||
run: bundle exec fasterer | ||
|
||
code-vulnerability-linters: | ||
commands: | ||
bundle-audit: | ||
run: bundle exec bundle-audit check -c '.circleci/linter_configs/.bundler-audit.yml' --update | ||
|
||
code-documentation-linters: | ||
commands: | ||
cspell: | ||
run: cspell-cli lint -c '.circleci/linter_configs/.cspell.yml' '**/*.{txt,md}' | ||
markdownlint: | ||
run: markdownlint -c '.circleci/linter_configs/.markdownlint.yml' '**/*.md' | ||
|
||
release-linters: | ||
commands: | ||
changeloglint: | ||
run: .circleci/scripts/changeloglint.sh |
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 @@ | ||
--- | ||
|
||
default: true | ||
|
||
MD013: | ||
line_length: 500 | ||
|
||
MD024: | ||
siblings_only: true |
Oops, something went wrong.