Skip to content

Commit 36ebb6b

Browse files
authored
Merge pull request rails#48919 from zzak/actions-refactor
Refactor actions to make fewer status checks
2 parents 9b6dee0 + b9bdbce commit 36ebb6b

File tree

4 files changed

+45
-72
lines changed

4 files changed

+45
-72
lines changed

.github/workflows/lint.yml

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,34 @@ permissions:
66
contents: read
77

88
jobs:
9-
rails-bin:
10-
name: Check rails-bin lints
9+
lint:
1110
runs-on: ubuntu-latest
11+
env:
12+
BUNDLE_WITHOUT: db:job:cable:storage:ujs
13+
1214
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Set up Ruby 3.2
18+
uses: ruby/setup-ruby@v1
19+
with:
20+
ruby-version: 3.2
21+
bundler-cache: true
22+
23+
- name: mdl
24+
run: bundle exec rake -f guides/Rakefile guides:lint
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v3
28+
with:
29+
python-version: "3.10"
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install codespell==2.1.0
34+
- name: Check spelling with codespell
35+
run: codespell --ignore-words=codespell.txt --skip="./vendor/bundle,./actionview/test/ujs/public/vendor/qunit.js,./actiontext/app/assets/javascripts/trix.js,./yarn.lock" || exit 1
36+
1337
- uses: actions/checkout@v3
1438
with:
1539
repository: skipkayhil/rails-bin
@@ -23,31 +47,9 @@ jobs:
2347
path: rails
2448
- run: bin/check-changelogs ./rails
2549
- run: bin/check-config-docs ./rails
26-
codespell:
27-
name: Check spelling all files with codespell
28-
runs-on: ubuntu-latest
29-
strategy:
30-
matrix:
31-
python-version: ['3.10']
32-
steps:
33-
- uses: actions/checkout@v3
34-
- name: Set up Python ${{ matrix.python-version }}
35-
uses: actions/setup-python@v2
36-
with:
37-
python-version: ${{ matrix.python-version }}
38-
- name: Install dependencies
39-
run: |
40-
python -m pip install --upgrade pip
41-
pip install codespell==2.1.0
42-
- name: Check spelling with codespell
43-
run: codespell --ignore-words=codespell.txt --skip="./actionview/test/ujs/public/vendor/qunit.js,./actiontext/app/assets/javascripts/trix.js,./yarn.lock" || exit 1
44-
45-
notify:
46-
runs-on: ubuntu-latest
47-
if: always() && github.ref_name == 'main'
48-
continue-on-error: true
49-
needs: [rails-bin, codespell]
50-
steps:
51-
- uses: zzak/action-discord@v4
52-
with:
53-
webhook: ${{ secrets.DISCORD_WEBHOOK }}
50+
51+
- uses: zzak/action-discord@v4
52+
continue-on-error: true
53+
if: always() && github.ref_name == 'main'
54+
with:
55+
webhook: ${{ secrets.DISCORD_WEBHOOK }}

.github/workflows/mdl.yml

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

.github/workflows/build-and-test-dev-image.yml renamed to .github/workflows/rails-new-docker.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
name: Build and test --dev image
1+
name: rails-new-docker
22

33
on: [push, pull_request]
44

55
env:
66
APP_NAME: devrails
77
APP_PATH: dev/devrails
8+
BUNDLE_WITHOUT: db:job:cable:storage:ujs
89

910
jobs:
10-
build-and-test-dev-image:
11+
rails-new-docker:
1112
runs-on: ubuntu-latest
1213
steps:
1314
- uses: actions/checkout@v3
@@ -33,12 +34,8 @@ jobs:
3334
- name: Test container
3435
run: ruby -r ./.github/workflows/scripts/test-container.rb
3536

36-
notify:
37-
runs-on: ubuntu-latest
38-
if: always() && github.ref_name == 'main'
39-
continue-on-error: true
40-
needs: build-and-test-dev-image
41-
steps:
42-
- uses: zzak/action-discord@v4
43-
with:
44-
webhook: ${{ secrets.DISCORD_WEBHOOK }}
37+
- uses: zzak/action-discord@v4
38+
continue-on-error: true
39+
if: always() && github.ref_name == 'main'
40+
with:
41+
webhook: ${{ secrets.DISCORD_WEBHOOK }}

.github/workflows/rubocop.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,8 @@ jobs:
2323
- name: Run RuboCop
2424
run: bundle exec rubocop --parallel
2525

26-
notify:
27-
runs-on: ubuntu-latest
28-
if: always() && github.ref_name == 'main'
29-
continue-on-error: true
30-
needs: build
31-
steps:
32-
- uses: zzak/action-discord@v4
33-
with:
34-
webhook: ${{ secrets.DISCORD_WEBHOOK }}
26+
- uses: zzak/action-discord@v4
27+
continue-on-error: true
28+
if: always() && github.ref_name == 'main'
29+
with:
30+
webhook: ${{ secrets.DISCORD_WEBHOOK }}

0 commit comments

Comments
 (0)