Skip to content

Commit 261345a

Browse files
committed
CI: Switch from Travis CI to GitHub Actions, use Docker for CrateDB
1 parent 2c2bf19 commit 261345a

File tree

5 files changed

+68
-106
lines changed

5 files changed

+68
-106
lines changed

.github/workflows/tests.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Tests
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
jobs:
8+
tests:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
os: [ ubuntu-latest, macos-latest ] # , windows-latest ]
13+
ruby-version: [ "2.6", "2.7", "3.0", "3.1" ]
14+
15+
services:
16+
cratedb:
17+
image: crate/crate:nightly
18+
ports:
19+
- 44200:4200
20+
21+
name: Ruby ${{ matrix.ruby-version }} on OS ${{ matrix.os }}
22+
steps:
23+
24+
- name: Acquire sources
25+
uses: actions/checkout@v3
26+
27+
- name: Setup Ruby
28+
uses: ruby/setup-ruby@v1
29+
with:
30+
ruby-version: ${{ matrix.ruby-version }}
31+
architecture: x64
32+
33+
- name: Caching of Ruby gems
34+
uses: actions/cache@v3
35+
id: cache-gems
36+
with:
37+
path: vendor/bundle
38+
key: gems-os=${{ matrix.os }}-ruby=${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
39+
40+
- name: Bundle install
41+
run: |
42+
gem install bundler
43+
bundle config path vendor/bundle
44+
bundle install
45+
46+
- name: Run tests
47+
run: bundle exec rspec
48+
49+
#- name: Run rubocop
50+
# run: bundle exec rubocop

.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

DEVELOP.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# Run tests
2+
3+
Run CrateDB on port 44200.
4+
```shell
5+
docker run --rm -it --publish=44200:4200 crate:5.1.1 \
6+
-Cdiscovery.type=single-node \
7+
-Ccluster.routing.allocation.disk.threshold_enabled=false
8+
```
9+
10+
Install project and invoke test suite.
11+
```shell
12+
bundle install
13+
bundle exec rspec
14+
```
15+
16+
117
# Release Process
218

319
Business as usual, but in case you forgot, here it is.
@@ -6,9 +22,8 @@ Business as usual, but in case you forgot, here it is.
622
* update `history.txt` to reflect the changes of this release
723
* Do the traditional trinity of:
824

9-
```ruby
25+
```shell
1026
gem update --system
1127
gem build gem build activerecord-crate-adapter.gemspec
1228
gem push activerecord-crate-adapter-<version>.gem
1329
```
14-

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,7 @@ Crate does not support Joins (yet) so joins won't work.
123123

124124
## Tests
125125

126-
Start up the crate server before running the tests
127-
128-
ruby spec/test_server.rb /path/to/crate
129-
130-
Then run tests with
131-
132-
bundle exec rspec spec
126+
See [DEVELOP.md](DEVELOP.md).
133127

134128

135129
## Contributing

spec/test_server.rb

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)