A platform for community discussion. Free, open, simple.
DEV: Clean up workflow files (#21526)
Jarek Radoszfc17045876bc
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.ymlindex 057208eda32..b308d844199 100644--- a/.github/workflows/labeler.yml+++ b/.github/workflows/labeler.yml@@ -1,14 +1,17 @@-name: "Pull Request Labeler"+name: Pull Request Labeler+on:-- pull_request_target+ - pull_request_target++permissions:+ contents: read+ pull-requests: writejobs:triage:- permissions:- contents: read- pull-requests: writeruns-on: ubuntu-latest+steps:- - uses: actions/labeler@v4- with:- repo-token: "${{ secrets.GITHUB_TOKEN }}"+ - uses: actions/labeler@v4+ with:+ repo-token: ${{ secrets.GITHUB_TOKEN }}diff --git a/.github/workflows/licenses.yml b/.github/workflows/licenses.ymlindex de665ecf290..40e53ad0c4a 100644--- a/.github/workflows/licenses.yml+++ b/.github/workflows/licenses.yml@@ -15,7 +15,7 @@ permissions:jobs:build:- if: "!(github.event_name == 'push' && github.repository == 'discourse/discourse-private-mirror')"+ if: github.event_name == 'pull_request' || github.repository != 'discourse/discourse-private-mirror'name: runruns-on: ubuntu-latestcontainer: discourse/discourse_test:slim@@ -36,8 +36,7 @@ jobs:with:path: vendor/bundlekey: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}- restore-keys: |- ${{ runner.os }}-gem-+ restore-keys: ${{ runner.os }}-gem-- name: Setup gemsrun: |@@ -61,8 +60,7 @@ jobs:with:path: ${{ steps.yarn-cache-dir.outputs.dir }}key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}- restore-keys: |- ${{ runner.os }}-yarn-+ restore-keys: ${{ runner.os }}-yarn-- name: Check RubyGems Licensesif: ${{ !cancelled() }}diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.ymlindex f2e8f47e6c1..0ded454e9e6 100644--- a/.github/workflows/linting.yml+++ b/.github/workflows/linting.yml@@ -15,7 +15,7 @@ permissions:jobs:build:- if: "!(github.event_name == 'push' && github.repository == 'discourse/discourse-private-mirror')"+ if: github.event_name == 'pull_request' || github.repository != 'discourse/discourse-private-mirror'name: runruns-on: ubuntu-latestcontainer: discourse/discourse_test:slim@@ -39,8 +39,7 @@ jobs:with:path: vendor/bundlekey: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}- restore-keys: |- ${{ runner.os }}-gem-+ restore-keys: ${{ runner.os }}-gem-- name: Setup gemsrun: |@@ -61,8 +60,7 @@ jobs:with:path: ${{ steps.yarn-cache-dir.outputs.dir }}key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}- restore-keys: |- ${{ runner.os }}-yarn-+ restore-keys: ${{ runner.os }}-yarn-- name: Yarn installrun: yarn install --frozen-lockfilediff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex 361466be61c..bf1d1bce817 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -17,7 +17,7 @@ permissions:jobs:build:- if: "!(github.event_name == 'push' && github.repository == 'discourse/discourse-private-mirror')"+ if: github.event_name == 'pull_request' || github.repository != 'discourse/discourse-private-mirror'name: ${{ matrix.target }} ${{ matrix.build_type }} ${{ matrix.ruby }}runs-on: ${{ (matrix.build_type == 'annotations') && 'ubuntu-latest' || 'ubuntu-20.04-8core' }}container: discourse/discourse_test:slim${{ (matrix.build_type == 'frontend' || matrix.build_type == 'system') && '-browsers' || '' }}${{ (matrix.ruby == '3.1') && '-ruby-3.1.0' || '' }}@@ -29,7 +29,7 @@ jobs:PGUSER: discoursePGPASSWORD: discourseUSES_PARALLEL_DATABASES: ${{ matrix.build_type == 'backend' || matrix.build_type == 'system' }}- CAPBYARA_DEFAULT_MAX_WAIT_TIME: 4+ CABPYARA_DEFAULT_MAX_WAIT_TIME: 4strategy:fail-fast: false@@ -37,7 +37,7 @@ jobs:matrix:build_type: [backend, frontend, system, annotations]target: [core, plugins]- ruby: ['3.2']+ ruby: ["3.2"]exclude:- build_type: annotationstarget: plugins@@ -72,8 +72,7 @@ jobs:with:path: vendor/bundlekey: ${{ runner.os }}-${{ matrix.ruby }}-gem-${{ hashFiles('**/Gemfile.lock') }}- restore-keys: |- ${{ runner.os }}-${{ matrix.ruby }}-gem-+ restore-keys: ${{ runner.os }}-${{ matrix.ruby }}-gem-- name: Setup gemsrun: |@@ -94,8 +93,7 @@ jobs:with:path: ${{ steps.yarn-cache-dir.outputs.dir }}key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}- restore-keys: |- ${{ runner.os }}-yarn-+ restore-keys: ${{ runner.os }}-yarn-- name: Yarn installrun: yarn install --frozen-lockfile@@ -113,10 +111,9 @@ jobs:id: app-cachewith:path: tmp/app-cache- key: >- # postgres version, hash of migrations, "parallel?"+ key: >-${{ runner.os }}-${{ hashFiles('.github/workflows/tests.yml') }}-- ${{ matrix.postgres }}-${{ hashFiles('db/**/*', 'plugins/**/db/**/*') }}-${{ env.USES_PARALLEL_DATABASES }}@@ -229,7 +226,7 @@ jobs:timeout-minutes: 30core_frontend_tests:- if: "!(github.event_name == 'push' && github.repository == 'discourse/discourse-private-mirror')"+ if: github.event_name == 'pull_request' || github.repository != 'discourse/discourse-private-mirror'name: core frontend (${{ matrix.browser }})runs-on: ubuntu-20.04-8corecontainer:@@ -267,8 +264,7 @@ jobs:with:path: ${{ steps.yarn-cache-dir.outputs.dir }}key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}- restore-keys: |- ${{ runner.os }}-yarn-+ restore-keys: ${{ runner.os }}-yarn-- name: Yarn installworking-directory: ./app/assets/javascripts/discourse@@ -278,15 +274,15 @@ jobs:working-directory: ./app/assets/javascripts/discourserun: |mkdir /tmp/emberbuild- yarn ember build --environment=test -o /tmp/emberbuild+ yarn ember build --environment=test -o /tmp/emberbuild- name: Core QUnitworking-directory: ./app/assets/javascripts/discourse- run: yarn ember exam --path /tmp/emberbuild --load-balance --parallel=5 --launch "${{ env.TESTEM_BROWSER }}" --write-execution-file --random+ run: yarn ember exam --path /tmp/emberbuild --load-balance --parallel=5 --launch "${{ env.TESTEM_BROWSER }}" --write-execution-file --randomtimeout-minutes: 15- uses: actions/upload-artifact@v3if: ${{ always() }}with:- name: ember-exam-execution-${{matrix.browser}}+ name: ember-exam-execution-${{ matrix.browser }}path: ./app/assets/javascripts/discourse/test-execution-*.jsondiff --git a/spec/rails_helper.rb b/spec/rails_helper.rbindex a72d8c1dbff..8a1747478c2 100644--- a/spec/rails_helper.rb+++ b/spec/rails_helper.rb@@ -237,8 +237,8 @@ RSpec.configure do |config|WebMock.disable_net_connect!(allow_localhost: true, allow: [Webdrivers::Chromedriver.base_url])- if ENV["CAPBYARA_DEFAULT_MAX_WAIT_TIME"].present?- Capybara.default_max_wait_time = ENV["CAPBYARA_DEFAULT_MAX_WAIT_TIME"].to_i+ if ENV["CAPYBARA_DEFAULT_MAX_WAIT_TIME"].present?+ Capybara.default_max_wait_time = ENV["CAPYBARA_DEFAULT_MAX_WAIT_TIME"].to_iendCapybara.threadsafe = true