Skip to content

Commit

Permalink
add pg in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jaigouk committed Apr 10, 2023
1 parent 9392654 commit 6b18012
Showing 1 changed file with 29 additions and 27 deletions.
56 changes: 29 additions & 27 deletions .github/workflows/main.yml
Expand Up @@ -19,39 +19,41 @@ jobs:
- '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 exec rspec
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/neighbor_test
- name: setup pgvector
run: |
sudo apt-get update && sudo apt-get install postgresql-server-dev-14
- 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
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/neighbor_test
- 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
- name: Run RuboCop
run: bundle exec rubocop
- 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

0 comments on commit 6b18012

Please sign in to comment.