From c65bccef8687e255c2ebd66096d7c058435086c1 Mon Sep 17 00:00:00 2001 From: Jeff Felchner Date: Sun, 27 Dec 2020 11:06:59 -0600 Subject: [PATCH] Chore: Change To Github Actions --- .github/workflows/linting.yml | 179 ++++++++++++++++++++++++++++++++++ .github/workflows/testing.yml | 56 +++++++++++ Gemfile | 11 +-- Gemfile.lock | 38 +------- gemfiles/v1/Gemfile | 10 ++ gemfiles/v1/Gemfile.lock | 37 +++++++ gemfiles/v1/fuubar.gemspec | 1 + gemfiles/v2/Gemfile | 16 +++ gemfiles/v2/Gemfile.lock | 65 ++++++++++++ gemfiles/v2/fuubar.gemspec | 1 + 10 files changed, 367 insertions(+), 47 deletions(-) create mode 100644 .github/workflows/linting.yml create mode 100644 .github/workflows/testing.yml mode change 100644 => 120000 Gemfile mode change 100644 => 120000 Gemfile.lock create mode 100644 gemfiles/v1/Gemfile create mode 100644 gemfiles/v1/Gemfile.lock create mode 120000 gemfiles/v1/fuubar.gemspec create mode 100644 gemfiles/v2/Gemfile create mode 100644 gemfiles/v2/Gemfile.lock create mode 120000 gemfiles/v2/fuubar.gemspec diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 0000000..37d5093 --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,179 @@ +--- + +name: "Build" + +on: + - "push" + +jobs: + lint: + name: "Linting" + runs-on: "ubuntu-latest" + + steps: + - name: "Cache Ruby" + uses: "actions/cache@v2" + with: + path: "vendor/bundle" + key: | + ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-gems- + + - name: "Cache NodeJS" + uses: "actions/cache@v2" + with: + path: "~/.npm" + key: | + ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: "Cache Python" + uses: "actions/cache@v2" + with: + path: "~/.cache/pip" + key: | + ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: "Checkout Code" + uses: "actions/checkout@v2" + timeout-minutes: 5 + with: + fetch-depth: 0 + + - name: "Build Ruby" + uses: "actions/setup-ruby@v1" + with: + ruby-version: 2.7 + + - name: "Build Node" + + uses: "actions/setup-node@v2" + with: + node-version: 14 + + - name: "Install Ruby Gems" + run: > + gem install --no-document + rubocop + rubocop-rspec + rubocop-rails + rubocop-performance + + - name: "Install Node Modules" + run: > + npm install -g + @prantlf/jsonlint + babel-eslint + eslint + htmlhint + remark-cli + remark-lint-blockquote-indentation + remark-lint-checkbox-character-style + remark-lint-code-block-style + remark-lint-definition-case + remark-lint-definition-spacing + remark-lint-emphasis-marker + remark-lint-fenced-code-flag + remark-lint-fenced-code-marker + remark-lint-file-extension + remark-lint-final-definition + remark-lint-final-newline + remark-lint-first-heading-level + remark-lint-hard-break-spaces + remark-lint-heading-increment + remark-lint-heading-style + remark-lint-heading-whitespace + remark-lint-linebreak-style + remark-lint-link-title-style + remark-lint-list-item-bullet-indent + remark-lint-list-item-content-indent + remark-lint-list-item-indent + remark-lint-list-item-spacing + remark-lint-maximum-line-length + remark-lint-no-auto-link-without-protocol + remark-lint-no-blockquote-without-marker + remark-lint-no-blockquote-without-marker + remark-lint-no-consecutive-blank-lines + remark-lint-no-duplicate-definitions + remark-lint-no-duplicate-headings + remark-lint-no-duplicate-headings-in-section + remark-lint-no-duplicate-headings-in-section + remark-lint-no-emphasis-as-heading + remark-lint-no-empty-sections + remark-lint-no-empty-sections + remark-lint-no-empty-url + remark-lint-no-empty-url + remark-lint-no-file-name-articles + remark-lint-no-file-name-consecutive-dashes + remark-lint-no-file-name-irregular-characters + remark-lint-no-file-name-mixed-case + remark-lint-no-file-name-outer-dashes + remark-lint-no-heading-content-indent + remark-lint-no-heading-indent + remark-lint-no-heading-indent + remark-lint-no-heading-like-paragraph + remark-lint-no-heading-like-paragraph + remark-lint-no-heading-punctuation + remark-lint-no-html + remark-lint-no-inline-padding + remark-lint-no-literal-urls + remark-lint-no-missing-blank-lines + remark-lint-no-missing-blank-lines + remark-lint-no-multiple-toplevel-headings + remark-lint-no-paragraph-content-indent + remark-lint-no-paragraph-content-indent + remark-lint-no-reference-like-url + remark-lint-no-reference-like-url + remark-lint-no-shell-dollars + remark-lint-no-shortcut-reference-image + remark-lint-no-shortcut-reference-link + remark-lint-no-table-indentation + remark-lint-no-tabs + remark-lint-no-tabs + remark-lint-no-undefined-references + remark-lint-no-unused-definitions + remark-lint-no-url-trailing-slash + remark-lint-no-url-trailing-slash + remark-lint-ordered-list-marker-style + remark-lint-ordered-list-marker-value + remark-lint-rule-style + remark-lint-strong-marker + remark-lint-table-cell-padding + remark-lint-table-pipe-alignment + remark-lint-table-pipes + remark-lint-unordered-list-marker-style + remark-message-control + remark-preset-lint-consistent + remark-preset-lint-markdown-style-guide + remark-preset-lint-recommended + stylelint + stylelint-order + stylelint-scss + + - name: "Install Python Eggs" + run: > + pip install --user + vim-vint + + - name: "Install Packages" + run: > + sudo apt install -y + shellcheck + tidy + yamllint + + - name: "Run Rubocop" + run: | + rubocop --force-exclusion + + - name: "Run YAMLLint" + run: | + yamllint -f "github" -d ".yamllint" . + + - name: "Run Remark" + run: | + remark --ignore-path .markdownlintignore --silently-ignore **/*.md .**/*.md diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml new file mode 100644 index 0000000..b453055 --- /dev/null +++ b/.github/workflows/testing.yml @@ -0,0 +1,56 @@ +--- + +name: "Build" + +on: + - "push" + +jobs: + test: + name: "Testing" + runs-on: "ubuntu-latest" + + strategy: + matrix: + ruby: + - 2.1 + - 2.2 + - 2.3 + - 2.4 + - 2.5 + - 2.6 + - 2.7 + - 3.0 + - ruby-head + include: + - ruby: 2.1 + bundler: 1 + + - ruby: 2.2 + bundler: 1 + + - ruby: 2.3 + bundler: 1 + + continue-on-error: ${{ endsWith(matrix.ruby, 'head') }} + + env: + BUNDLE_GEMFILE: "./gemfiles/v${{ matrix.bundler || '2' }}/Gemfile" + + steps: + - name: "Checkout Code" + uses: "actions/checkout@v2" + timeout-minutes: 5 + with: + fetch-depth: 0 + + - name: "Build Ruby" + uses: "ruby/setup-ruby@v1" + with: + ruby-version: "${{ matrix.ruby }}" + bundler: "${{ matrix.bundler || 2 }}" + bundler-cache: true + + - name: "Run RSpec" + run: | + bundle exec rspec diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 90df1d4..0000000 --- a/Gemfile +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -source 'https://rubygems.org' - -group :console do - gem 'awesome_print', '~> 1.7' -end - -# Specify your gem's dependencies in fuubar.gemspec -gemspec diff --git a/Gemfile b/Gemfile new file mode 120000 index 0000000..35704f6 --- /dev/null +++ b/Gemfile @@ -0,0 +1 @@ +./gemfiles/v2/Gemfile \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 2bdec5b..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,37 +0,0 @@ -PATH - remote: . - specs: - fuubar (2.5.0) - rspec-core (~> 3.0) - ruby-progressbar (~> 1.4) - -GEM - remote: https://rubygems.org/ - specs: - awesome_print (1.8.0) - diff-lcs (1.3) - rspec (3.8.0) - rspec-core (~> 3.8.0) - rspec-expectations (~> 3.8.0) - rspec-mocks (~> 3.8.0) - rspec-core (3.8.0) - rspec-support (~> 3.8.0) - rspec-expectations (3.8.3) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.8.0) - rspec-mocks (3.8.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.8.0) - rspec-support (3.8.0) - ruby-progressbar (1.10.0) - -PLATFORMS - ruby - -DEPENDENCIES - awesome_print (~> 1.7) - fuubar! - rspec (~> 3.7) - -BUNDLED WITH - 1.17.2 diff --git a/Gemfile.lock b/Gemfile.lock new file mode 120000 index 0000000..908a5d4 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1 @@ +./gemfiles/v2/Gemfile.lock \ No newline at end of file diff --git a/gemfiles/v1/Gemfile b/gemfiles/v1/Gemfile new file mode 100644 index 0000000..90df1d4 --- /dev/null +++ b/gemfiles/v1/Gemfile @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +source 'https://rubygems.org' + +group :console do + gem 'awesome_print', '~> 1.7' +end + +# Specify your gem's dependencies in fuubar.gemspec +gemspec diff --git a/gemfiles/v1/Gemfile.lock b/gemfiles/v1/Gemfile.lock new file mode 100644 index 0000000..1f2a897 --- /dev/null +++ b/gemfiles/v1/Gemfile.lock @@ -0,0 +1,37 @@ +PATH + remote: . + specs: + fuubar (2.5.0) + rspec-core (~> 3.0) + ruby-progressbar (~> 1.4) + +GEM + remote: https://rubygems.org/ + specs: + awesome_print (1.8.0) + diff-lcs (1.4.4) + rspec (3.10.0) + rspec-core (~> 3.10.0) + rspec-expectations (~> 3.10.0) + rspec-mocks (~> 3.10.0) + rspec-core (3.10.0) + rspec-support (~> 3.10.0) + rspec-expectations (3.10.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.10.0) + rspec-mocks (3.10.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.10.0) + rspec-support (3.10.0) + ruby-progressbar (1.10.1) + +PLATFORMS + ruby + +DEPENDENCIES + awesome_print (~> 1.7) + fuubar! + rspec (~> 3.7) + +BUNDLED WITH + 1.17.3 diff --git a/gemfiles/v1/fuubar.gemspec b/gemfiles/v1/fuubar.gemspec new file mode 120000 index 0000000..4846e2f --- /dev/null +++ b/gemfiles/v1/fuubar.gemspec @@ -0,0 +1 @@ +../../fuubar.gemspec \ No newline at end of file diff --git a/gemfiles/v2/Gemfile b/gemfiles/v2/Gemfile new file mode 100644 index 0000000..a0f492f --- /dev/null +++ b/gemfiles/v2/Gemfile @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +source 'https://rubygems.org' + +group :console do + gem 'awesome_print', '~> 1.7' +end + +group :development do + gem 'rubocop', '~> 1.6' + gem 'rubocop-performance', '~> 1.9' + gem 'rubocop-rspec', '~> 2.1' +end + +# Specify your gem's dependencies in fuubar.gemspec +gemspec diff --git a/gemfiles/v2/Gemfile.lock b/gemfiles/v2/Gemfile.lock new file mode 100644 index 0000000..0238545 --- /dev/null +++ b/gemfiles/v2/Gemfile.lock @@ -0,0 +1,65 @@ +PATH + remote: . + specs: + fuubar (2.5.0) + rspec-core (~> 3.0) + ruby-progressbar (~> 1.4) + +GEM + remote: https://rubygems.org/ + specs: + ast (2.4.1) + awesome_print (1.8.0) + diff-lcs (1.3) + parallel (1.20.1) + parser (2.7.2.0) + ast (~> 2.4.1) + rainbow (3.0.0) + regexp_parser (2.0.1) + rexml (3.2.4) + rspec (3.8.0) + rspec-core (~> 3.8.0) + rspec-expectations (~> 3.8.0) + rspec-mocks (~> 3.8.0) + rspec-core (3.8.0) + rspec-support (~> 3.8.0) + rspec-expectations (3.8.3) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.8.0) + rspec-mocks (3.8.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.8.0) + rspec-support (3.8.0) + rubocop (1.6.1) + parallel (~> 1.10) + parser (>= 2.7.1.5) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml + rubocop-ast (>= 1.2.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 1.4.0, < 2.0) + rubocop-ast (1.3.0) + parser (>= 2.7.1.5) + rubocop-performance (1.9.1) + rubocop (>= 0.90.0, < 2.0) + rubocop-ast (>= 0.4.0) + rubocop-rspec (2.1.0) + rubocop (~> 1.0) + rubocop-ast (>= 1.1.0) + ruby-progressbar (1.10.0) + unicode-display_width (1.7.0) + +PLATFORMS + ruby + +DEPENDENCIES + awesome_print (~> 1.7) + fuubar! + rspec (~> 3.7) + rubocop (~> 1.6) + rubocop-performance (~> 1.9) + rubocop-rspec (~> 2.1) + +BUNDLED WITH + 2.1.4 diff --git a/gemfiles/v2/fuubar.gemspec b/gemfiles/v2/fuubar.gemspec new file mode 120000 index 0000000..4846e2f --- /dev/null +++ b/gemfiles/v2/fuubar.gemspec @@ -0,0 +1 @@ +../../fuubar.gemspec \ No newline at end of file