-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (61 loc) · 1.6 KB
/
ruby.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
61
62
63
64
65
66
name: Ruby
on:
push:
branches: [ master ]
pull_request: {}
env:
DATABASE_URL: postgres://postgres:[email protected]:5432/test
BASE_URL: localhost:3000
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.5
bundler-cache: true
- name: Run rubocop
run: bundle exec rubocop
security:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.5
bundler-cache: true
- name: bundler-audit
run: bundle exec bundle audit check --update
- name: Brakeman
run: bundle exec brakeman
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: test
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.5
bundler-cache: true
- name: Create database
run: bundle exec bin/rails db:create db:migrate RAILS_ENV=test
- name: Run tests
run: bundle exec rails test:prepare && bundle exec rails test && bundle exec rspec
- name: SimpleCov+ Action
uses: joshmfrankel/simplecov-check-action@main
with:
minimum_suite_coverage: 100
github_token: ${{ secrets.GITHUB_TOKEN }}