diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a329ac9e29550..ce136942a83a4 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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 @@ -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 }} diff --git a/.github/workflows/mdl.yml b/.github/workflows/mdl.yml deleted file mode 100644 index e9a0a1d4293d1..0000000000000 --- a/.github/workflows/mdl.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Markdown Lint [Guides] - -on: [pull_request] - -permissions: - contents: read - -jobs: - mdl: - runs-on: ubuntu-latest - - 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: Run mdl - run: bundle exec rake -f guides/Rakefile guides:lint diff --git a/.github/workflows/build-and-test-dev-image.yml b/.github/workflows/rails-new-docker.yml similarity index 70% rename from .github/workflows/build-and-test-dev-image.yml rename to .github/workflows/rails-new-docker.yml index e6a5f0afaa0ba..874c36a678783 100644 --- a/.github/workflows/build-and-test-dev-image.yml +++ b/.github/workflows/rails-new-docker.yml @@ -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 @@ -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 }} diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index 69b1eb0075fb3..320b1f1d59daf 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -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 }}