add cerebras tests #537
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ruby | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
specs: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby-version: | |
- '3.4' | |
- '3.3' | |
- '3.2' | |
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 | |
- uses: ankane/setup-postgres@v1 | |
with: | |
database: boxcars_test | |
dev-files: true | |
id: postgre | |
- run: | | |
cd /tmp | |
git clone --branch v0.4.1 https://github.com/pgvector/pgvector.git | |
cd pgvector | |
make | |
sudo make install | |
- name: Run tests | |
env: | |
DATABASE_URL: postgres://postgres:@localhost:5432/boxcars_test | |
run: bundle exec rake spec | |
rubocop: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.1' | |
bundler-cache: true | |
- name: Run RuboCop | |
run: bundle exec rake rubocop | |
publish-rubygem: | |
runs-on: ubuntu-latest | |
name: Publish Ruby Gem | |
needs: [specs, rubocop] | |
steps: | |
- name: publish gem | |
uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.1' | |
bundler-cache: true | |
- run: | | |
mkdir -p $HOME/.gem | |
touch $HOME/.gem/credentials | |
chmod 0600 $HOME/.gem/credentials | |
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials | |
gem build *.gemspec | |
gem push *.gem | |
env: | |
# Make sure to update the secret name | |
# if yours isn't named RUBYGEMS_AUTH_TOKEN | |
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}" | |
if: ${{ steps.release.outputs.release_created }} | |