-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (99 loc) · 2.82 KB
/
Copy pathruby.yml
File metadata and controls
113 lines (99 loc) · 2.82 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Github Testing
on:
push:
branches:
- master
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
id-token: write
jobs:
bundle_audit:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4.10
bundler-cache: true
- name: config bundler
run: |
bundle config set without 'development staging production'
bundle config set deployment 'true'
bundle env
head -n1 $(which bundle)
- name: Bundle Audit Check
run: bundle exec bundle-audit check --update
brakeman:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4.10
bundler-cache: true
- name: config bundler
run: |
bundle config set without 'development staging production'
bundle config set deployment 'true'
bundle env
head -n1 $(which bundle)
- name: Run Brakeman
run: bundle exec brakeman --quiet --skip-libs --exit-on-warn --ignore-config=.brakeman-ignore
test:
services:
postgres:
image: postgres:18
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: password
POSTGRES_USERNAME: postgres
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04]
ruby: ['3.4.5']
runs-on: ${{ matrix.os }}
env:
PG_DATABASE: postgres
PG_HOST: localhost
PG_USER: postgres
PG_PASSWORD: password
PG_PORT: 5432
RAILS_ENV: test
COVERAGE: true
DISABLE_SPRING: 1
steps:
- uses: actions/checkout@v5
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: config bundler
run: |
bundle config set without 'development staging production'
bundle config set deployment 'true'
bundle env
head -n1 $(which bundle)
- name: Prepare configs
run: |
cp config/application.yml.sample config/application.yml || true
cp config/database_ci.yml config/database.yml
- name: Prepare database
run: |
bundle exec rake db:create
bundle exec rake db:schema:load
- name: Run RSpec with coverage
run: bundle exec rspec spec
- uses: qltysh/qlty-action/coverage@v2
with:
oidc: true
files: coverage/.resultset.json
- uses: actions/upload-artifact@v5
with:
name: coverage
path: coverage/