Skip to content

Commit 9e617e3

Browse files
author
Mattia Roccoberton
committed
feat: setup GitHub actions
1 parent 0ae918c commit 9e617e3

File tree

6 files changed

+92
-3
lines changed

6 files changed

+92
-3
lines changed

.github/FUNDING.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# These are supported funding model platforms
2+
3+
github: [blocknotes]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/workflows/linters.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: Linters
3+
4+
on:
5+
pull_request:
6+
branches: [main]
7+
push:
8+
branches: [main]
9+
10+
jobs:
11+
reviewdog:
12+
name: Reviewdog
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v2
18+
19+
- name: Set up Ruby
20+
uses: ruby/setup-ruby@v1
21+
with:
22+
ruby-version: '3.0'
23+
bundler-cache: true
24+
25+
- name: Set up Reviewdog
26+
uses: reviewdog/action-setup@v1
27+
with:
28+
reviewdog_version: latest
29+
30+
- name: Run Reviewdog
31+
env:
32+
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
run: |
34+
reviewdog -fail-on-error -reporter=github-pr-review -runners=rubocop
35+
36+
# NOTE: check with: reviewdog -fail-on-error -reporter=github-pr-review -runners=fasterer -diff="git diff" -tee

.github/workflows/specs_rails_70.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Specs Rails 7.0
3+
4+
on:
5+
pull_request:
6+
branches: [main]
7+
push:
8+
branches: [main]
9+
10+
jobs:
11+
tests:
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
ruby: ['3.0', '3.1', '3.2']
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v2
21+
22+
- name: Set up Ruby
23+
uses: ruby/setup-ruby@v1
24+
with:
25+
ruby-version: ${{ matrix.ruby }}
26+
bundler-cache: true
27+
28+
- name: Create database
29+
run: cd spec/dummy && bundle exec rails db:create
30+
31+
- name: Apply migrations
32+
run: cd spec/dummy && bundle exec rails db:migrate
33+
34+
- name: Run tests
35+
run: bundle exec rspec --profile

.reviewdog.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
runner:
2+
fasterer:
3+
cmd: bin/fasterer
4+
level: info
5+
rubocop:
6+
cmd: bin/rubocop
7+
level: info

.rubocop.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ AllCops:
1414
- vendor/**/*
1515
NewCops: enable
1616
SuggestExtensions: false
17-
TargetRubyVersion: 2.7
17+
TargetRubyVersion: 3.0
1818

1919
Lint/MissingSuper:
2020
Exclude:

Gemfile

-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ group :development, :test do
2020
gem 'simplecov', require: false
2121

2222
# Linters
23-
# gem 'brakeman'
2423
# gem 'fasterer'
25-
# gem 'reek'
2624
gem 'rubocop'
2725
gem 'rubocop-packaging'
2826
gem 'rubocop-performance'

0 commit comments

Comments
 (0)