Skip to content

Commit afd79a7

Browse files
authored
Simplify build actions
1 parent 1e627a9 commit afd79a7

File tree

1 file changed

+14
-42
lines changed

1 file changed

+14
-42
lines changed

.github/workflows/rubyonrails.yml

Lines changed: 14 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -10,49 +10,21 @@ on:
1010
branches: [ "master" ]
1111
pull_request:
1212
branches: [ "master" ]
13+
1314
jobs:
14-
test:
15+
build:
1516
runs-on: ubuntu-latest
16-
services:
17-
postgres:
18-
image: postgres:11-alpine
19-
ports:
20-
- "5432:5432"
21-
env:
22-
POSTGRES_DB: rails_test
23-
POSTGRES_USER: rails
24-
POSTGRES_PASSWORD: password
25-
env:
26-
RAILS_ENV: test
27-
DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test"
28-
steps:
29-
- name: Checkout code
30-
uses: actions/checkout@v3
31-
# Add or replace dependency steps here
32-
- name: Install Ruby and gems
33-
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
34-
with:
35-
bundler-cache: true
36-
# Add or replace database setup steps here
37-
- name: Set up database schema
38-
run: bin/rails db:schema:load
39-
# Add or replace test runners here
40-
- name: Run tests
41-
run: bin/rake
4217

43-
lint:
44-
runs-on: ubuntu-latest
4518
steps:
46-
- name: Checkout code
47-
uses: actions/checkout@v3
48-
- name: Install Ruby and gems
49-
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
50-
with:
51-
bundler-cache: true
52-
# Add or replace any other lints here
53-
- name: Security audit dependencies
54-
run: bin/bundler-audit --update
55-
- name: Security audit application code
56-
run: bin/brakeman -q -w2
57-
- name: Lint Ruby files
58-
run: bin/rubocop --parallel
19+
- uses: actions/checkout@v3
20+
21+
- name: Set up Ruby 2.7
22+
uses: ruby/setup-ruby@v1
23+
with:
24+
ruby-version: 2.7
25+
26+
- name: Install dependencies
27+
run: bundle install
28+
29+
- name: Run tests
30+
run: bundle exec rake

0 commit comments

Comments
 (0)