generated from trywilco/Anythink-Market-Base
-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (48 loc) · 1.57 KB
/
test_e2e_rails.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
58
59
60
name: E2E Rails
on:
pull_request:
jobs:
ci-checks:
name: Pr checks
runs-on: ubuntu-20.04
timeout-minutes: 6
services:
postgres:
image: postgres:13
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Check out project
uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
working-directory: .framework/rails/backend
bundler-cache: true
- uses: oNaiPs/secrets-to-env-action@v1
with:
secrets: ${{ toJSON(secrets) }}
- run: bundle install
working-directory: .framework/rails/backend
- run: DATABASE_URL=postgresql://postgres:postgres@localhost/anythink-market bin/rails db:create db:migrate
working-directory: .framework/rails/backend
- run: ENGINE_BASE_URL=http://localhost:3003 WILCO_ID=0 DATABASE_URL=postgresql://postgres:postgres@localhost/anythink-market bin/rails s >& /dev/null &
working-directory: .framework/rails/backend
- name: Run checks
uses: actions/setup-node@v3
with:
node-version: "16"
cache: "yarn"
cache-dependency-path: tests/e2e/yarn.lock
- run: yarn install
working-directory: tests/e2e/
- run: yarn wait-on http://localhost:3000/health --timeout 5000
working-directory: tests/e2e/
- run: yarn test
working-directory: tests/e2e/