Skip to content

Commit 3a27687

Browse files
authored
github workflow updates (#10)
* use shared config for CD, stale, triage * consolidate main and CI into one workflow * update workflow step name * update gemfile.lock rm Gemfile.lock && bundle * explicitly require ostruct * apply new standardrb linter rules * use universal-darwin platform
1 parent 5fcbd9d commit 3a27687

File tree

9 files changed

+192
-141
lines changed

9 files changed

+192
-141
lines changed

.github/workflows/cd.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,8 @@ on:
55
workflows: [CI]
66
types: [completed]
77
branches: [main]
8+
89
jobs:
9-
deploy:
10-
runs-on: ubuntu-latest
11-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
12-
steps:
13-
- uses: actions/checkout@8230315d06ad95c617244d2f265d237a1682d445
14-
- name: Tag and Push Gem
15-
id: tag-and-push-gem
16-
uses: discourse/publish-rubygems-action@4bd305c65315cb691bad1e8de97a87aaf29a0a85
17-
env:
18-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
19-
GIT_EMAIL: ${{secrets.GUSTO_GIT_EMAIL}}
20-
GIT_NAME: ${{secrets.GUSTO_GIT_NAME}}
21-
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
22-
- name: Create GitHub Release
23-
run: gh release create v${{steps.tag-and-push-gem.outputs.gem_version}} --generate-notes
24-
if: ${{ steps.tag-and-push-gem.outputs.new_version == 'true' }}
25-
env:
26-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10+
call-workflow-from-shared-config:
11+
uses: rubyatscale/shared-config/.github/workflows/cd.yml@main
12+
secrets: inherit

.github/workflows/ci.yml

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,44 @@
11
name: CI
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
48

59
jobs:
6-
rspec:
10+
test_and_lint:
711
runs-on: ubuntu-latest
812
strategy:
913
matrix:
1014
ruby:
11-
- 2.7
12-
# See comment comes from https://github.com/ruby/setup-ruby#matrix-of-ruby-versions
13-
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
14-
- '3.0'
1515
- 3.1
16+
- 3.2
17+
- 3.3
1618
env:
1719
BUNDLE_GEMFILE: Gemfile
18-
name: "RSpec tests: Ruby ${{ matrix.ruby }}"
20+
name: "Test and lint: Ruby ${{ matrix.ruby }}"
1921
steps:
20-
- uses: actions/checkout@8230315d06ad95c617244d2f265d237a1682d445
22+
- uses: actions/checkout@v4
2123
- name: Set up Ruby ${{ matrix.ruby }}
22-
uses: ruby/setup-ruby@b203567269b5bbc256dbc1c84f7495913f977353
24+
uses: ruby/setup-ruby@v1
2325
with:
2426
bundler-cache: true
2527
ruby-version: ${{ matrix.ruby }}
26-
- name: Run tests
27-
run: bundle exec rspec
28+
- name: Run tests and linter
29+
run: bundle exec rake
30+
notify_on_failure:
31+
runs-on: ubuntu-latest
32+
needs: [test_and_lint]
33+
if: ${{ failure() && github.ref == 'refs/heads/main' }}
34+
env:
35+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
36+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
37+
steps:
38+
- uses: slackapi/[email protected]
39+
with:
40+
payload: |
41+
{
42+
"text": "${{ github.repository }}/${{ github.ref }}: FAILED\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
43+
}
44+

.github/workflows/main.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/stale.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: 'Close stale issues and PRs'
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
jobs:
7+
call-workflow-from-shared-config:
8+
uses: rubyatscale/shared-config/.github/workflows/stale.yml@main

.github/workflows/triage.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Label issues as "triage"
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
jobs:
8+
call-workflow-from-shared-config:
9+
uses: rubyatscale/shared-config/.github/workflows/triage.yml@main

Gemfile.lock

Lines changed: 138 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -3,117 +3,174 @@ PATH
33
specs:
44
bigrails-redis (0.7.2)
55
activesupport (>= 6)
6+
ostruct
67
railties (>= 6)
78
redis (>= 4)
89

910
GEM
1011
remote: https://rubygems.org/
1112
specs:
12-
actionpack (7.0.2.3)
13-
actionview (= 7.0.2.3)
14-
activesupport (= 7.0.2.3)
15-
rack (~> 2.0, >= 2.2.0)
13+
actionpack (7.1.3.3)
14+
actionview (= 7.1.3.3)
15+
activesupport (= 7.1.3.3)
16+
nokogiri (>= 1.8.5)
17+
racc
18+
rack (>= 2.2.4)
19+
rack-session (>= 1.0.1)
1620
rack-test (>= 0.6.3)
17-
rails-dom-testing (~> 2.0)
18-
rails-html-sanitizer (~> 1.0, >= 1.2.0)
19-
actionview (7.0.2.3)
20-
activesupport (= 7.0.2.3)
21+
rails-dom-testing (~> 2.2)
22+
rails-html-sanitizer (~> 1.6)
23+
actionview (7.1.3.3)
24+
activesupport (= 7.1.3.3)
2125
builder (~> 3.1)
22-
erubi (~> 1.4)
23-
rails-dom-testing (~> 2.0)
24-
rails-html-sanitizer (~> 1.1, >= 1.2.0)
25-
activesupport (7.0.2.3)
26+
erubi (~> 1.11)
27+
rails-dom-testing (~> 2.2)
28+
rails-html-sanitizer (~> 1.6)
29+
activesupport (7.1.3.3)
30+
base64
31+
bigdecimal
2632
concurrent-ruby (~> 1.0, >= 1.0.2)
33+
connection_pool (>= 2.2.5)
34+
drb
2735
i18n (>= 1.6, < 2)
2836
minitest (>= 5.1)
37+
mutex_m
2938
tzinfo (~> 2.0)
3039
ast (2.4.2)
40+
base64 (0.2.0)
41+
bigdecimal (3.1.8)
3142
builder (3.2.4)
32-
concurrent-ruby (1.1.10)
33-
connection_pool (2.2.5)
43+
concurrent-ruby (1.2.3)
44+
connection_pool (2.4.1)
3445
crass (1.0.6)
35-
diff-lcs (1.5.0)
36-
erubi (1.10.0)
37-
fakeredis (0.8.0)
38-
redis (~> 4.1)
39-
i18n (1.10.0)
46+
diff-lcs (1.5.1)
47+
drb (2.2.1)
48+
erubi (1.12.0)
49+
fakeredis (0.9.2)
50+
redis (~> 4.8)
51+
i18n (1.14.5)
4052
concurrent-ruby (~> 1.0)
41-
loofah (2.16.0)
53+
io-console (0.7.2)
54+
irb (1.13.1)
55+
rdoc (>= 4.0.0)
56+
reline (>= 0.4.2)
57+
json (2.7.2)
58+
language_server-protocol (3.17.0.3)
59+
lint_roller (1.1.0)
60+
loofah (2.22.0)
4261
crass (~> 1.0.2)
43-
nokogiri (>= 1.5.9)
44-
method_source (1.0.0)
45-
mini_portile2 (2.8.5)
46-
minitest (5.15.0)
47-
nokogiri (1.13.4)
48-
mini_portile2 (~> 2.8.0)
62+
nokogiri (>= 1.12.0)
63+
minitest (5.23.1)
64+
mutex_m (0.2.0)
65+
nokogiri (1.16.5-aarch64-linux)
4966
racc (~> 1.4)
50-
parallel (1.22.1)
51-
parser (3.1.2.0)
67+
nokogiri (1.16.5-arm-linux)
68+
racc (~> 1.4)
69+
nokogiri (1.16.5-arm64-darwin)
70+
racc (~> 1.4)
71+
nokogiri (1.16.5-x86-linux)
72+
racc (~> 1.4)
73+
nokogiri (1.16.5-x86_64-darwin)
74+
racc (~> 1.4)
75+
nokogiri (1.16.5-x86_64-linux)
76+
racc (~> 1.4)
77+
ostruct (0.6.0)
78+
parallel (1.24.0)
79+
parser (3.3.1.0)
5280
ast (~> 2.4.1)
53-
racc (1.6.0)
54-
rack (2.2.3)
55-
rack-test (1.1.0)
56-
rack (>= 1.0, < 3)
57-
rails-dom-testing (2.0.3)
58-
activesupport (>= 4.2.0)
81+
racc
82+
psych (5.1.2)
83+
stringio
84+
racc (1.8.0)
85+
rack (3.0.11)
86+
rack-session (2.0.0)
87+
rack (>= 3.0.0)
88+
rack-test (2.1.0)
89+
rack (>= 1.3)
90+
rackup (2.1.0)
91+
rack (>= 3)
92+
webrick (~> 1.8)
93+
rails-dom-testing (2.2.0)
94+
activesupport (>= 5.0.0)
95+
minitest
5996
nokogiri (>= 1.6)
60-
rails-html-sanitizer (1.4.2)
61-
loofah (~> 2.3)
62-
railties (7.0.2.3)
63-
actionpack (= 7.0.2.3)
64-
activesupport (= 7.0.2.3)
65-
method_source
97+
rails-html-sanitizer (1.6.0)
98+
loofah (~> 2.21)
99+
nokogiri (~> 1.14)
100+
railties (7.1.3.3)
101+
actionpack (= 7.1.3.3)
102+
activesupport (= 7.1.3.3)
103+
irb
104+
rackup (>= 1.0.0)
66105
rake (>= 12.2)
67-
thor (~> 1.0)
68-
zeitwerk (~> 2.5)
106+
thor (~> 1.0, >= 1.2.2)
107+
zeitwerk (~> 2.6)
69108
rainbow (3.1.1)
70-
rake (13.0.6)
71-
redis (4.6.0)
72-
regexp_parser (2.3.1)
73-
rexml (3.2.5)
74-
rspec (3.11.0)
75-
rspec-core (~> 3.11.0)
76-
rspec-expectations (~> 3.11.0)
77-
rspec-mocks (~> 3.11.0)
78-
rspec-core (3.11.0)
79-
rspec-support (~> 3.11.0)
80-
rspec-expectations (3.11.0)
109+
rake (13.2.1)
110+
rdoc (6.6.3.1)
111+
psych (>= 4.0.0)
112+
redis (4.8.1)
113+
regexp_parser (2.9.2)
114+
reline (0.5.7)
115+
io-console (~> 0.5)
116+
rexml (3.2.8)
117+
strscan (>= 3.0.9)
118+
rspec (3.13.0)
119+
rspec-core (~> 3.13.0)
120+
rspec-expectations (~> 3.13.0)
121+
rspec-mocks (~> 3.13.0)
122+
rspec-core (3.13.0)
123+
rspec-support (~> 3.13.0)
124+
rspec-expectations (3.13.0)
81125
diff-lcs (>= 1.2.0, < 2.0)
82-
rspec-support (~> 3.11.0)
83-
rspec-mocks (3.11.1)
126+
rspec-support (~> 3.13.0)
127+
rspec-mocks (3.13.1)
84128
diff-lcs (>= 1.2.0, < 2.0)
85-
rspec-support (~> 3.11.0)
86-
rspec-support (3.11.0)
87-
rubocop (1.27.0)
129+
rspec-support (~> 3.13.0)
130+
rspec-support (3.13.1)
131+
rubocop (1.63.5)
132+
json (~> 2.3)
133+
language_server-protocol (>= 3.17.0)
88134
parallel (~> 1.10)
89-
parser (>= 3.1.0.0)
135+
parser (>= 3.3.0.2)
90136
rainbow (>= 2.2.2, < 4.0)
91137
regexp_parser (>= 1.8, < 3.0)
92-
rexml
93-
rubocop-ast (>= 1.16.0, < 2.0)
138+
rexml (>= 3.2.5, < 4.0)
139+
rubocop-ast (>= 1.31.1, < 2.0)
94140
ruby-progressbar (~> 1.7)
95-
unicode-display_width (>= 1.4.0, < 3.0)
96-
rubocop-ast (1.17.0)
97-
parser (>= 3.1.1.0)
98-
rubocop-performance (1.13.3)
99-
rubocop (>= 1.7.0, < 2.0)
100-
rubocop-ast (>= 0.4.0)
101-
ruby-progressbar (1.11.0)
102-
standard (1.10.0)
103-
rubocop (= 1.27.0)
104-
rubocop-performance (= 1.13.3)
105-
thor (1.2.1)
106-
tzinfo (2.0.4)
141+
unicode-display_width (>= 2.4.0, < 3.0)
142+
rubocop-ast (1.31.3)
143+
parser (>= 3.3.1.0)
144+
rubocop-performance (1.21.0)
145+
rubocop (>= 1.48.1, < 2.0)
146+
rubocop-ast (>= 1.31.1, < 2.0)
147+
ruby-progressbar (1.13.0)
148+
standard (1.36.0)
149+
language_server-protocol (~> 3.17.0.2)
150+
lint_roller (~> 1.0)
151+
rubocop (~> 1.63.0)
152+
standard-custom (~> 1.0.0)
153+
standard-performance (~> 1.4)
154+
standard-custom (1.0.2)
155+
lint_roller (~> 1.0)
156+
rubocop (~> 1.50)
157+
standard-performance (1.4.0)
158+
lint_roller (~> 1.1)
159+
rubocop-performance (~> 1.21.0)
160+
stringio (3.1.0)
161+
strscan (3.1.0)
162+
thor (1.3.1)
163+
tzinfo (2.0.6)
107164
concurrent-ruby (~> 1.0)
108-
unicode-display_width (2.1.0)
109-
zeitwerk (2.5.4)
165+
unicode-display_width (2.5.0)
166+
webrick (1.8.1)
167+
zeitwerk (2.6.14)
110168

111169
PLATFORMS
112-
arm64-darwin-20
113-
arm64-darwin-21
114-
arm64-darwin-22
115-
arm64-darwin-23
116-
x86_64-darwin-21
170+
aarch64-linux
171+
arm-linux
172+
universal-darwin
173+
x86-linux
117174
x86_64-linux
118175

119176
DEPENDENCIES
@@ -125,4 +182,4 @@ DEPENDENCIES
125182
standard
126183

127184
BUNDLED WITH
128-
2.4.12
185+
2.5.6

0 commit comments

Comments
 (0)