Skip to content

feat(clickhouse): Add organization.events_store attribute [ING-205] #330

feat(clickhouse): Add organization.events_store attribute [ING-205]

feat(clickhouse): Add organization.events_store attribute [ING-205] #330

Workflow file for this run

name: Ruby tests
on:
push:
branches:
- "main"
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
jobs:
integration-tests:
runs-on: ubuntu-latest
services:
lago:
image: getlago/lago:latest
options: >-
--health-cmd "curl -f http://localhost:3000/health || exit 1"
--health-interval 5s
--health-timeout 5s
--health-retries 10
--health-start-period 15s
ports:
- 3000:3000
env:
LAGO_CREATE_ORG: true
LAGO_ORG_USER_PASSWORD: 123456
LAGO_ORG_USER_EMAIL: test@test.com
LAGO_ORG_NAME: Hooli
LAGO_ORG_API_KEY: 123456
env:
INTEGRATION_TESTS_ENABLED: true
TEST_LAGO_API_URL: http://localhost:3000
TEST_LAGO_API_KEY: 123456
steps:
- uses: actions/checkout@v3
- name: Ensure API key exists
run: |
docker exec -i ${{ job.services.lago.id }} su postgres -c "psql -d lago" <<'SQL'
INSERT INTO api_keys (id, organization_id, value, permissions, created_at, updated_at)
SELECT gen_random_uuid(), id, '123456', '{}'::jsonb, now(), now()
FROM organizations o
WHERE NOT EXISTS (SELECT 1 FROM api_keys WHERE organization_id = o.id)
LIMIT 1;
UPDATE api_keys SET value = '123456'
WHERE id = (SELECT id FROM api_keys ORDER BY created_at LIMIT 1);
SQL
- name: Set up Ruby 4.0
uses: ruby/setup-ruby@v1
with:
ruby-version: 4.0
bundler-cache: true
- name: Run tests
run: bundle exec rspec --tag integration
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version:
- 3.2
- 3.3
- 3.4
- 4.0
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: Run tests
run: bundle exec rspec