OpenAI executor: support model URL #172
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 with PostgreSQL | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby-version: ['3.3.0'] | |
services: | |
db: | |
image: postgres:latest | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: test_db | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby and PostgreSQL | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
mirror: 'bd' # Use the Brazilian mirror for faster downloads | |
- name: Install PostgreSQL client | |
run: | | |
sudo apt-get install postgresql-client | |
- name: Wait for PostgreSQL to be ready | |
run: | | |
until pg_isready -h localhost -p 5432 -U postgres; do | |
echo "Waiting for PostgreSQL to start..." | |
sleep 1 | |
done | |
- name: Generate creds file | |
run: | | |
EDITOR="mate --wait" ./bin/rails credentials:edit | |
- name: Install Node.js and Yarn | |
run: | | |
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
npm install -g yarn | |
- name: Yarn install | |
run: | | |
yarn install | |
- name: Precompile assets | |
run: | | |
SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile | |
- name: Setup database schema | |
run: | | |
# Replace with your database setup commands (e.g., migrations) | |
bundle exec rake db:create db:schema:load | |
- name: Run tests | |
run: bundle exec rspec | |
- name: Run rubocop | |
run: bundle exec rubocop -DES |