-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.4 KB
/
ruby.yml
File metadata and controls
51 lines (42 loc) · 1.4 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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.
name: Ruby CI
env:
RAILS_ENV: test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0
- name: Install dependencies
run: bundle install
- name: Setup Database
run: |
cp .github/database.yml config/database.yml
bundle exec rake db:create
bundle exec rake db:schema:load
- name: Run tests
run: bundle exec rake
- name: Formatting and Security Checks
run: |
bundle exec rubocop
bundle exec brakeman
- name: Check for missing annotations
run: bundle exec annotate