Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/jest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Jest specs

on: [push, pull_request]

jobs:
build:
name: Jest specs
strategy:
matrix:
os: [ubuntu-latest]
node: [10.x, 12.x, 14.x]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.node }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node }}-yarn-

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Jest Specs
run: yarn test
42 changes: 42 additions & 0 deletions .github/workflows/js-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: JS lint

on: [push, pull_request]

jobs:
build:
name: JS Lint

strategy:
matrix:
os: [ubuntu-latest]
node: [12.x]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Lint
run: yarn lint
40 changes: 40 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Rubocop

on: [push, pull_request]

jobs:
build:
name: Rubocop
strategy:
matrix:
os: [ubuntu-latest]
ruby: [
2.7
]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/cache@v2
with:
path: /home/runner/bundle
key: bundle-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
bundle-gems-

- uses: actions/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}

- name: Bundle install
run: |
gem install bundler -v 2.1.4
bundle config path /home/runner/bundle
bundle install --jobs 4 --retry 3

- name: Ruby linter
run: bundle exec rubocop
67 changes: 67 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Ruby specs

on: [push, pull_request]

jobs:
build:
name: Ruby specs
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ruby: [
2.4,
2.5,
2.6,
2.7
]
gemfile: [
"gemfiles/Gemfile-rails.5.2.x",
"gemfiles/Gemfile-rails.6.0.x"
]
exclude:
- ruby: "2.4"
gemfile: gemfiles/Gemfile-rails.6.0.x
experimental: [false]
include:
- ruby: head
os: ubuntu-latest
gemfile: gemfiles/Gemfile-rails.6.0.x
experimental: true
- ruby: 2.6
os: ubuntu-latest
gemfile: gemfiles/Gemfile-rails-edge
experimental: true
- ruby: 2.7
os: ubuntu-latest
gemfile: gemfiles/Gemfile-rails-edge
experimental: true

runs-on: ${{ matrix.os }}
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' || matrix.experimental }}

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/cache@v2
with:
path: /home/runner/bundle
key: bundle-${{ matrix.ruby }}-${{ matrix.gemfile }}-gems-${{ hashFiles(matrix.gemfile) }}-${{ hashFiles('**/*.gemspec') }}
restore-keys: |
bundle-${{ matrix.ruby }}-${{ matrix.gemfile }}-gems-

- uses: actions/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}

- name: Bundle install
run: |
gem install bundler -v 2.1.4
bundle config path /home/runner/bundle
bundle config --global gemfile ${{ matrix.gemfile }}
bundle install --jobs 4 --retry 3

- name: Ruby specs
run: bundle exec rake test
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,4 @@ DEPENDENCIES
webpacker!

BUNDLED WITH
1.17.3
2.1.4