File tree Expand file tree Collapse file tree 1 file changed +86
-0
lines changed Expand file tree Collapse file tree 1 file changed +86
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Tests
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ - next
8
+ pull_request :
9
+
10
+ jobs :
11
+ test :
12
+ runs-on : ubuntu-latest
13
+ services :
14
+ db :
15
+ image : postgres:13
16
+ ports :
17
+ - 5432:5432
18
+ env :
19
+ POSTGRES_USER : postgres
20
+ POSTGRES_PASSWORD : password
21
+ POSTGRES_DB : test_db
22
+ options : >-
23
+ --health-cmd="pg_isready -U postgres"
24
+ --health-interval=10s
25
+ --health-timeout=5s
26
+ --health-retries=5
27
+ env :
28
+ RAILS_ENV : test
29
+ DATABASE_URL : postgres://postgres:password@localhost:5432/test_db
30
+ steps :
31
+ - name : Checkout code
32
+ uses : actions/checkout@v3
33
+ - name : Set up Ruby
34
+ uses : ruby/setup-ruby@v1
35
+ with :
36
+ bundler-cache : true
37
+ # - name: Set up Node.js
38
+ # uses: actions/setup-node@v3
39
+ # with:
40
+ # node-version: '16'
41
+ # - name: Install Yarn dependencies
42
+ # run: yarn install --frozen-lockfile
43
+ - name : Set up database
44
+ run : |
45
+ bin/rails db:create db:schema:load
46
+ - name : Run tests
47
+ run : |
48
+ bin/rails test
49
+ system_test :
50
+ runs-on : ubuntu-latest
51
+ services :
52
+ db :
53
+ image : postgres:13
54
+ ports :
55
+ - 5432:5432
56
+ env :
57
+ POSTGRES_USER : postgres
58
+ POSTGRES_PASSWORD : password
59
+ POSTGRES_DB : test_db
60
+ options : >-
61
+ --health-cmd="pg_isready -U postgres"
62
+ --health-interval=10s
63
+ --health-timeout=5s
64
+ --health-retries=5
65
+ env :
66
+ RAILS_ENV : test
67
+ DATABASE_URL : postgres://postgres:password@localhost/test_db
68
+ steps :
69
+ - name : Checkout code
70
+ uses : actions/checkout@v3
71
+ - name : Set up Ruby
72
+ uses : ruby/setup-ruby@v1
73
+ with :
74
+ bundler-cache : true
75
+ # - name: Set up Node.js
76
+ # uses: actions/setup-node@v3
77
+ # with:
78
+ # node-version: '16'
79
+ # - name: Install Yarn dependencies
80
+ # run: yarn install --frozen-lockfile
81
+ - name : Set up database
82
+ run : |
83
+ bin/rails db:create db:schema:load
84
+ - name : Run system tests
85
+ run : |
86
+ bin/rails test:system
You can’t perform that action at this time.
0 commit comments