Skip to content

Commit

Permalink
Add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
frodrigo committed Apr 13, 2024
1 parent 9b33c47 commit 8d46d5b
Show file tree
Hide file tree
Showing 5 changed files with 147 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/test-ruby.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test Ruby

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true

- name: Run rubocop
run: bundle exec rubocop --parallel

- name: Build native part
run: |
bundle exec rake generate && \
bundle exec rake compile
- name: Run typecheck
run: |
bundle exec tapioca init && \
bundle exec srb typecheck -q
- name: Run tests
run: bundle exec rake test
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Gemfile.lock
pkg/
*.o
*.o.tmp
Expand All @@ -14,3 +13,6 @@ ext/overpass_parser/mkmf.log
/pkg/
/spec/reports/
/tmp/
sorbet
!sorbet/rbi/OverpassParser.rbi
bin/tapioca
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ AllCops:
NewCops: enable
TargetRubyVersion: 3.0
Exclude:
- 'vendor/**/*'
- 'ext/**/*'
- '*.gemspec'

Expand Down
107 changes: 107 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
PATH
remote: .
specs:
overpass_parser (1.0.0)
rice (~> 4.0)
sorbet-struct-comparable (~> 1.3.0)

GEM
remote: https://rubygems.org/
specs:
antlr4-native (2.2.1)
rice (~> 4.0)
ast (2.4.2)
byebug (11.1.3)
coderay (1.1.3)
erubi (1.12.0)
json (2.7.1)
language_server-protocol (3.17.0.3)
method_source (1.0.0)
minitest (5.22.3)
netrc (0.11.0)
parallel (1.24.0)
parser (3.3.0.5)
ast (~> 2.4.1)
racc
prism (0.24.0)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.10.1)
byebug (~> 11.0)
pry (>= 0.13, < 0.15)
racc (1.7.3)
rainbow (3.1.1)
rake (13.1.0)
rbi (0.1.9)
prism (>= 0.18.0, < 0.25)
sorbet-runtime (>= 0.5.9204)
regexp_parser (2.9.0)
rexml (3.2.6)
rice (4.3.1)
rubocop (1.62.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
rubocop-minitest (0.35.0)
rubocop (>= 1.61, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
ruby-progressbar (1.13.0)
sorbet (0.5.11318)
sorbet-static (= 0.5.11318)
sorbet-runtime (0.5.11318)
sorbet-static (0.5.11318-x86_64-linux)
sorbet-static-and-runtime (0.5.11318)
sorbet (= 0.5.11318)
sorbet-runtime (= 0.5.11318)
sorbet-struct-comparable (1.3.0)
sorbet-runtime (>= 0.5)
spoom (1.3.0)
erubi (>= 1.10.0)
prism (>= 0.19.0)
sorbet-static-and-runtime (>= 0.5.10187)
thor (>= 0.19.2)
tapioca (0.13.1)
bundler (>= 2.2.25)
netrc (>= 0.11.0)
parallel (>= 1.21.0)
rbi (>= 0.1.4, < 0.2)
sorbet-static-and-runtime (>= 0.5.11087)
spoom (>= 1.2.0)
thor (>= 1.2.0)
yard-sorbet
thor (1.3.1)
unicode-display_width (2.5.0)
yard (0.9.36)
yard-sorbet (0.8.1)
sorbet-runtime (>= 0.5)
yard (>= 0.9)

PLATFORMS
x86_64-linux

DEPENDENCIES
antlr4-native (~> 2.0)
minitest
overpass_parser!
pry-byebug
rake
rubocop (~> 1.21)
rubocop-minitest
rubocop-rake
sorbet
tapioca

BUNDLED WITH
2.5.4
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ bundle exec srb typecheck

Rubocop
```
bundle exec rubocop -c .rubocop.yml --autocorrect
bundle exec rubocop --parallel --autocorrect
```

Test
Expand Down

0 comments on commit 8d46d5b

Please sign in to comment.