Skip to content

Commit 8c18767

Browse files
committed
setup github actions
1 parent 8ca3216 commit 8c18767

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@master
10+
- name: Setup Ruby
11+
uses: actions/setup-ruby@v1
12+
with:
13+
ruby-version: 3.0.x
14+
- uses: actions/cache@v2
15+
with:
16+
path: vendor/bundle
17+
key: gems-build-rails-main-ruby-2.7.x-${{ hashFiles('**/Gemfile.lock') }}
18+
- name: Lint with Rubocop
19+
run: |
20+
gem install bundler:2.2.9
21+
bundle config path vendor/bundle
22+
bundle install --jobs 4 --retry 3
23+
bundle exec rubocop
24+
test:
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
ruby_version: ["2.6", "2.7", "3.0"]
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v2
32+
- name: Set up Ruby
33+
uses: ruby/setup-ruby@v1
34+
with:
35+
ruby-version: ${{ matrix.ruby_version }}
36+
- name: Install dependencies
37+
run: bundle install --jobs 4 --retry 3
38+
- name: Run tests
39+
run: bundle exec rake

0 commit comments

Comments
 (0)