-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.26 KB
/
Copy pathtest_analytics.yml
File metadata and controls
53 lines (46 loc) · 1.26 KB
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
env:
POSTGRES_PASSWORD: 1q2w3e4r
name: Test analytics service
on: [pull_request]
jobs:
test:
runs-on: ubuntu-latest
services:
db:
image: postgres:14
env:
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
chrome-server:
image: selenium/standalone-chrome:106.0
ports:
- 4444:4444
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
working-directory: ./analytics
bundler-cache: true
- name: Setup database and run tests
env:
DB_HOST: localhost
DB_USER: postgres
DB_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
KAFKA_BROKER: broker:9092
DOORKEEPER_APP_ID: secret
DOORKEEPER_APP_SECRET: secret
DOORKEEPER_APP_URL: https://oauth.example.com
TEST_BROWSER: chrome
TEST_BROWSER_URL: http://localhost:4444
run: |
cd analytics
bundle exec rails db:prepare
bundle exec rspec