Skip to content

Commit

Permalink
Merge pull request #48919 from zzak/actions-refactor
Browse files Browse the repository at this point in the history
Refactor actions to make fewer status checks
  • Loading branch information
matthewd committed Aug 22, 2023
2 parents 9b6dee0 + b9bdbce commit 36ebb6b
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 72 deletions.
62 changes: 32 additions & 30 deletions .github/workflows/lint.yml
Expand Up @@ -6,10 +6,34 @@ permissions:
contents: read

jobs:
rails-bin:
name: Check rails-bin lints
lint:
runs-on: ubuntu-latest
env:
BUNDLE_WITHOUT: db:job:cable:storage:ujs

steps:
- uses: actions/checkout@v3

- name: Set up Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true

- name: mdl
run: bundle exec rake -f guides/Rakefile guides:lint

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install codespell==2.1.0
- name: Check spelling with codespell
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

- uses: actions/checkout@v3
with:
repository: skipkayhil/rails-bin
Expand All @@ -23,31 +47,9 @@ jobs:
path: rails
- run: bin/check-changelogs ./rails
- run: bin/check-config-docs ./rails
codespell:
name: Check spelling all files with codespell
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install codespell==2.1.0
- name: Check spelling with codespell
run: codespell --ignore-words=codespell.txt --skip="./actionview/test/ujs/public/vendor/qunit.js,./actiontext/app/assets/javascripts/trix.js,./yarn.lock" || exit 1

notify:
runs-on: ubuntu-latest
if: always() && github.ref_name == 'main'
continue-on-error: true
needs: [rails-bin, codespell]
steps:
- uses: zzak/action-discord@v4
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}

- uses: zzak/action-discord@v4
continue-on-error: true
if: always() && github.ref_name == 'main'
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
22 changes: 0 additions & 22 deletions .github/workflows/mdl.yml

This file was deleted.

@@ -1,13 +1,14 @@
name: Build and test --dev image
name: rails-new-docker

on: [push, pull_request]

env:
APP_NAME: devrails
APP_PATH: dev/devrails
BUNDLE_WITHOUT: db:job:cable:storage:ujs

jobs:
build-and-test-dev-image:
rails-new-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -33,12 +34,8 @@ jobs:
- name: Test container
run: ruby -r ./.github/workflows/scripts/test-container.rb

notify:
runs-on: ubuntu-latest
if: always() && github.ref_name == 'main'
continue-on-error: true
needs: build-and-test-dev-image
steps:
- uses: zzak/action-discord@v4
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
- uses: zzak/action-discord@v4
continue-on-error: true
if: always() && github.ref_name == 'main'
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
14 changes: 5 additions & 9 deletions .github/workflows/rubocop.yml
Expand Up @@ -23,12 +23,8 @@ jobs:
- name: Run RuboCop
run: bundle exec rubocop --parallel

notify:
runs-on: ubuntu-latest
if: always() && github.ref_name == 'main'
continue-on-error: true
needs: build
steps:
- uses: zzak/action-discord@v4
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
- uses: zzak/action-discord@v4
continue-on-error: true
if: always() && github.ref_name == 'main'
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}

0 comments on commit 36ebb6b

Please sign in to comment.