-
Notifications
You must be signed in to change notification settings - Fork 100
57 lines (57 loc) · 1.95 KB
/
spec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Run Spec
on:
push:
branches:
- "main"
pull_request:
types: [opened, synchronize, reopened]
jobs:
run-spec:
name: Run Spec
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14-alpine
ports:
- "5432:5432"
env:
POSTGRES_DB: lago
POSTGRES_USER: lago
POSTGRES_PASSWORD: lago
env:
RAILS_ENV: test
DATABASE_URL: "postgres://lago:lago@localhost:5432/lago"
RAILS_MASTER_KEY: ${{ secrets.RAILS_TEST_KEY }}
SECRET_KEY_BASE: ${{ secrets.SECRET_KEY_BASE }}
ENCRYPTION_PRIMARY_KEY: 5I9mjfzry2P787x4S5ZuDdJwXNgYEwqo
ENCRYPTION_DETERMINISTIC_KEY: SGiZzmh18EjBF9gSW8LCNk7pelauWVr4
ENCRYPTION_KEY_DERIVATION_SALT: q3pkMw34ZkRPFSf2LmtWe705yw532Pf7
LAGO_API_URL: https://api.lago.dev
LAGO_PDF_URL: https://pdf.lago.dev
SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY }}
LAGO_FROM_EMAIL: noreply@getlago.com
LAGO_CLICKHOUSE_ENABLED: true
LAGO_CLICKHOUSE_HOST: localhost
LAGO_CLICKHOUSE_DATABASE: default
LAGO_CLICKHOUSE_USERNAME: ""
LAGO_CLICKHOUSE_PASSWORD: ""
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2.3"
bundler-cache: true
- name: Start Clickhouse database
run: |
docker run -d --rm -p 8123:8123 -p 9000:9000 --ulimit nofile=262144:262144 -v ./clickhouse-s3:/var/lib/clickhouse-s3 -v ./ci/clickhouse/config.xml:/etc/clickhouse-server/config.d/config.xml clickhouse/clickhouse-server
shell: bash
- name: Generate RSA keys
run: ./scripts/generate.rsa.sh
- name: Set up Postgres database schema
run: bin/rails db:schema:load:primary
- name: Set up Clickhouse database schema
run: bin/rails db:schema:load:clickhouse
- name: Run tests
run: bundle exec rspec