Skip to content

Commit bd562ca

Browse files
committed
Merge branch 'main' into andyw8/revise-testing-approach
2 parents a44dc3f + 5704d93 commit bd562ca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+3584
-2468
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "weekly"
7+
open-pull-requests-limit: 100
78
reviewers:
89
- "Shopify/ruby-dev-exp"
910
labels:

.github/workflows/ci.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,10 @@ jobs:
1212
gemfile:
1313
- Gemfile
1414
- gemfiles/Gemfile-rails-main
15-
ruby: ["3.0", "3.1", "3.2", "3.3"]
15+
ruby: ["3.1", "3.2", "3.3"]
1616
include:
1717
- gemfile: "gemfiles/Gemfile-rails-main"
1818
experimental: true
19-
exclude:
20-
- os: "windows-latest"
21-
ruby: "3.0"
22-
- Gemfile: "gemfiles/Gemfile-rails-main" # needs Ruby 3.1
23-
ruby: "3.0"
2419
runs-on: ${{ matrix.os }}
2520
timeout-minutes: 15
2621
env:
@@ -42,15 +37,24 @@ jobs:
4237
bundler-cache: true
4338
cache-version: 7
4439

45-
- name: Check if documentation is up to date
46-
run: bundle exec rake ruby_lsp:check_docs
40+
- name: Run tests
41+
run: bundle exec rake
42+
lint:
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v3
46+
47+
- name: Set up Ruby
48+
uses: ruby/setup-ruby@v1
49+
with:
50+
bundler: latest
51+
bundler-cache: true
4752

4853
- name: Typecheck
49-
if: matrix.os != 'windows-latest'
5054
run: bundle exec srb tc
5155

5256
- name: Lint Ruby files
5357
run: bin/rubocop
5458

55-
- name: Run tests
56-
run: bin/rails db:setup && bin/rails db:migrate && bin/rails test
59+
- name: Check if documentation is up to date
60+
run: bundle exec rake ruby_lsp:check_docs

CONTRIBUTING.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# CONTRIBUTING
2+
3+
Bug reports and pull requests are welcome on GitHub at https://github.com/Shopify/ruby-lsp-rails. This project is
4+
intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the
5+
[Contributor Covenant](https://github.com/Shopify/ruby-lsp-rails/blob/main/CODE_OF_CONDUCT.md) code of conduct.
6+
7+
# Developing on Ruby LSP
8+
9+
For general information about developing, refer to the to the [documentation](https://github.com/Shopify/ruby-lsp/blob/main/CONTRIBUTING.md#debugging-with-vs-code) for Ruby LSP itself.
10+
11+
### Manually testing a change
12+
13+
The repo includes a dummy Rails app in `test/dummy`. If you're developing a feature, you can add new code to it for testing.
14+
15+
To test with a real Rails application, you can add a Gemfile entry for `ruby-lsp-rails` and point it to your local checkout:
16+
17+
```ruby
18+
gem "ruby-lsp-rails", path: "../ruby-lsp-rails"
19+
```
20+
21+
Or to a branch in your fork:
22+
23+
```ruby
24+
gem "ruby-lsp-rails", github: "USERNAME/ruby-lsp-rails", branch: "your_branch"
25+
```
26+
27+
### Running the test suite
28+
29+
To set up the database for the dummy Rails app, and run the full test suite:
30+
31+
```shell
32+
bundle exec rake
33+
```
34+
35+
Tests are written as `ActiveSupport::TestCase` tests, so an individual test can be run with:
36+
37+
```shell
38+
bin/rails test test/my_test.rb
39+
```

Gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,8 @@ gem "tapioca", "~> 0.13", require: false, platforms: :ruby
2020
gem "psych", "~> 5.1", require: false
2121
gem "rails"
2222
gem "webmock"
23+
24+
platforms :mingw, :x64_mingw, :mswin, :jruby do
25+
gem "tzinfo"
26+
gem "tzinfo-data"
27+
end

0 commit comments

Comments
 (0)