Skip to content

Commit

Permalink
Chore: Change To Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jfelchner committed Dec 27, 2020
1 parent 97808ec commit c65bcce
Show file tree
Hide file tree
Showing 10 changed files with 367 additions and 47 deletions.
179 changes: 179 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -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
56 changes: 56 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -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
10 changes: 0 additions & 10 deletions Gemfile

This file was deleted.

1 change: 1 addition & 0 deletions Gemfile
37 changes: 0 additions & 37 deletions Gemfile.lock

This file was deleted.

1 change: 1 addition & 0 deletions Gemfile.lock
10 changes: 10 additions & 0 deletions gemfiles/v1/Gemfile
Original file line number Diff line number Diff line change
@@ -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
37 changes: 37 additions & 0 deletions gemfiles/v1/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions gemfiles/v1/fuubar.gemspec
16 changes: 16 additions & 0 deletions gemfiles/v2/Gemfile
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit c65bcce

Please sign in to comment.