-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (53 loc) · 1.38 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Ruby
on:
push:
branches: [main]
tags:
- 'v*'
pull_request:
branches: [main]
jobs:
specs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby-version:
- '3.2'
- '3.1'
- '3.0'
env:
DATABASE_URL: postgres://postgres:password@localhost:5432/neighbor_test
steps:
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: postgres
uses: ankane/setup-postgres@v1
with:
database: neighbor_test
- run: bundle install --jobs 4 --retry 3
- run: bundle exec rspec
- name: setup pgvector
run: |
sudo apt-get update && sudo apt-get install -y postgresql-server-dev-14
git clone --branch v0.4.1 https://github.com/pgvector/pgvector.git
cd pgvector
make
sudo make install
- run: EXT=vector bundle exec rspec
rubocop:
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
- run: bundle install --jobs 4 --retry 3
- name: Run RuboCop
run: bundle exec rubocop