Skip to content

Add DB encryption for email + OpenAI and Anthropic API keys #874

Add DB encryption for email + OpenAI and Anthropic API keys

Add DB encryption for email + OpenAI and Anthropic API keys #874

Workflow file for this run

name: Ruby on Rails CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}-test
cancel-in-progress: true
timeout-minutes: 2
services:
postgres:
image: postgres:16.1
ports:
- "5432:5432"
env:
POSTGRES_DB: hostedgpt_test
POSTGRES_USER: rails
POSTGRES_PASSWORD: password
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
RAILS_ENV: test
DATABASE_URL: "postgres://rails:password@localhost:5432/hostedgpt_test"
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Set up database schema
run: bin/rails db:schema:load
- name: Build CSS
run: bin/rails tailwindcss:build
- name: Run tests
run: bin/rails test
system_tests:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}-system
cancel-in-progress: true
services:
postgres:
image: postgres:16.1
ports:
- "5432:5432"
env:
POSTGRES_DB: hostedgpt_test
POSTGRES_USER: rails
POSTGRES_PASSWORD: password
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
RAILS_ENV: test
DATABASE_URL: "postgres://rails:password@localhost:5432/hostedgpt_test"
DISPLAY: "=:99"
steps:
- uses: nanasess/setup-chromedriver@v2
- name: Start chromedriver
run: |
set -x
chromedriver --url-base=/wd/hub &
# sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
- name: Checkout code
uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Set up database schema
run: bin/rails db:schema:load
- name: Build CSS
run: bin/rails tailwindcss:build
- name: Run system tests
run: bin/rails test test/system
- name: Upload screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: System Test Screenshots
path: tmp/screenshots/
if-no-files-found: ignore
lint:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}-lint
cancel-in-progress: true
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Lint Ruby files
run: bin/rubocop