File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+ on : [push]
3
+
4
+ jobs :
5
+ linters :
6
+ name : Linters
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ - name : Checkout code
10
+ uses : actions/checkout@v2
11
+ - name : Setup Ruby and install gems
12
+ uses : ruby/setup-ruby@v1
13
+ with :
14
+ bundler-cache : true
15
+ - name : Run linters
16
+ run : |
17
+ bin/rubocop --parallel
18
+ - name : Run security checks
19
+ run : |
20
+ bin/bundler-audit --update
21
+
22
+ tests :
23
+ name : Tests
24
+ runs-on : ubuntu-latest
25
+ services :
26
+ postgres :
27
+ image : postgres:13
28
+ env :
29
+ POSTGRES_USER : myapp
30
+ POSTGRES_DB : myapp_test
31
+ POSTGRES_PASSWORD : " "
32
+ ports : ["5432:5432"]
33
+ steps :
34
+ - name : Checkout code
35
+ uses : actions/checkout@v2
36
+ - name : Setup Ruby and install gems
37
+ uses : ruby/setup-ruby@v1
38
+ with :
39
+ bundler-cache : true
40
+ - name : Setup test database
41
+ env :
42
+ RAILS_ENV : test
43
+ PGHOST : localhost
44
+ PGUSER : myapp
45
+ run : |
46
+ bin/rails db:setup
47
+ - name : Run tests
48
+ run : bin/rspec
You can’t perform that action at this time.
0 commit comments