Skip to content

Commit 5807d18

Browse files
committed
Update workflows + add dependabot
1 parent 5288907 commit 5807d18

3 files changed

Lines changed: 33 additions & 6 deletions

File tree

.github/dependabot.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: bundler
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10

.github/workflows/rspec.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ jobs:
1010
runs-on: ubuntu-24.04
1111
services:
1212
postgres:
13-
image: postgres:16
13+
image: postgres:17
1414
env:
1515
POSTGRES_PASSWORD: password
1616
ports:
1717
- 5432:5432
18+
options: --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3
19+
1820
env:
1921
# Do not install production/staging-only gems in test environment
2022
BUNDLE_WITHOUT: "production staging"
@@ -27,18 +29,20 @@ jobs:
2729
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
2830
QLTY_COVERAGE_TOKEN: ${{ secrets.QLTY_COVERAGE_TOKEN }}
2931
steps:
32+
- name: Install packages
33+
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y google-chrome-stable
3034
- uses: actions/checkout@v3
3135
- name: Set up Ruby
3236
uses: ruby/setup-ruby@v1
3337
with:
3438
bundler-cache: true
35-
- name: Setup Database
36-
run: |
37-
bundle exec rails db:setup
3839
- name: Download and install Code Climate test reporter
3940
run: |
4041
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
4142
chmod +x ./cc-test-reporter
43+
- name: Setup Database
44+
run: |
45+
bundle exec rails db:test:prepare
4246
- name: Run before-build command
4347
run: ./cc-test-reporter before-build
4448
- name: Create Chrome data directory
@@ -50,7 +54,6 @@ jobs:
5054
env:
5155
CHROME_DATA_DIR: /tmp/chrome-data-rspec
5256
COVERAGE: "true"
53-
CI: "true"
5457
# - name: Submit Legacy Code Climate Coverage Report
5558
# if: env.CC_TEST_REPORTER_ID != ''
5659
# run: |

.github/workflows/rubocop.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@ on:
66
workflow_dispatch:
77

88
jobs:
9+
scan:
10+
runs-on: ubuntu-latest
11+
env:
12+
# Do not install production/staging-only gems in test environment
13+
BUNDLE_WITHOUT: "production staging default test"
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
- name: Set up Ruby
18+
uses: ruby/setup-ruby@v1
19+
with:
20+
ruby-version: .tool-versions
21+
bundler-cache: true
22+
- name: Scan for security vulnerabilities
23+
run: bin/brakeman
24+
925
lint:
1026
runs-on: ubuntu-24.04
1127
env:
@@ -17,6 +33,7 @@ jobs:
1733
- name: Set up Ruby
1834
uses: ruby/setup-ruby@v1
1935
with:
36+
ruby-version: .tool-versions
2037
bundler-cache: true
2138
- name: Run RuboCop
22-
run: bundle exec rubocop
39+
run: bin/rubocop

0 commit comments

Comments
 (0)