mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Clean up workflow files (#21526)
This commit is contained in:
parent
b34767d88e
commit
fc17045876
19
.github/workflows/labeler.yml
vendored
19
.github/workflows/labeler.yml
vendored
@ -1,14 +1,17 @@
|
|||||||
name: "Pull Request Labeler"
|
name: Pull Request Labeler
|
||||||
|
|
||||||
on:
|
on:
|
||||||
- pull_request_target
|
- pull_request_target
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage:
|
triage:
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pull-requests: write
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/labeler@v4
|
- uses: actions/labeler@v4
|
||||||
with:
|
with:
|
||||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
8
.github/workflows/licenses.yml
vendored
8
.github/workflows/licenses.yml
vendored
@ -15,7 +15,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
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: run
|
name: run
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: discourse/discourse_test:slim
|
container: discourse/discourse_test:slim
|
||||||
@ -36,8 +36,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: vendor/bundle
|
path: vendor/bundle
|
||||||
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
|
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
|
||||||
restore-keys: |
|
restore-keys: ${{ runner.os }}-gem-
|
||||||
${{ runner.os }}-gem-
|
|
||||||
|
|
||||||
- name: Setup gems
|
- name: Setup gems
|
||||||
run: |
|
run: |
|
||||||
@ -61,8 +60,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir.outputs.dir }}
|
path: ${{ steps.yarn-cache-dir.outputs.dir }}
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
restore-keys: |
|
restore-keys: ${{ runner.os }}-yarn-
|
||||||
${{ runner.os }}-yarn-
|
|
||||||
|
|
||||||
- name: Check RubyGems Licenses
|
- name: Check RubyGems Licenses
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
|
8
.github/workflows/linting.yml
vendored
8
.github/workflows/linting.yml
vendored
@ -15,7 +15,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
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: run
|
name: run
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: discourse/discourse_test:slim
|
container: discourse/discourse_test:slim
|
||||||
@ -39,8 +39,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: vendor/bundle
|
path: vendor/bundle
|
||||||
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
|
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
|
||||||
restore-keys: |
|
restore-keys: ${{ runner.os }}-gem-
|
||||||
${{ runner.os }}-gem-
|
|
||||||
|
|
||||||
- name: Setup gems
|
- name: Setup gems
|
||||||
run: |
|
run: |
|
||||||
@ -61,8 +60,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir.outputs.dir }}
|
path: ${{ steps.yarn-cache-dir.outputs.dir }}
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
restore-keys: |
|
restore-keys: ${{ runner.os }}-yarn-
|
||||||
${{ runner.os }}-yarn-
|
|
||||||
|
|
||||||
- name: Yarn install
|
- name: Yarn install
|
||||||
run: yarn install --frozen-lockfile
|
run: yarn install --frozen-lockfile
|
||||||
|
26
.github/workflows/tests.yml
vendored
26
.github/workflows/tests.yml
vendored
@ -17,7 +17,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
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 }}
|
name: ${{ matrix.target }} ${{ matrix.build_type }} ${{ matrix.ruby }}
|
||||||
runs-on: ${{ (matrix.build_type == 'annotations') && 'ubuntu-latest' || 'ubuntu-20.04-8core' }}
|
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' || '' }}
|
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: discourse
|
PGUSER: discourse
|
||||||
PGPASSWORD: discourse
|
PGPASSWORD: discourse
|
||||||
USES_PARALLEL_DATABASES: ${{ matrix.build_type == 'backend' || matrix.build_type == 'system' }}
|
USES_PARALLEL_DATABASES: ${{ matrix.build_type == 'backend' || matrix.build_type == 'system' }}
|
||||||
CAPBYARA_DEFAULT_MAX_WAIT_TIME: 4
|
CABPYARA_DEFAULT_MAX_WAIT_TIME: 4
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@ -37,7 +37,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
build_type: [backend, frontend, system, annotations]
|
build_type: [backend, frontend, system, annotations]
|
||||||
target: [core, plugins]
|
target: [core, plugins]
|
||||||
ruby: ['3.2']
|
ruby: ["3.2"]
|
||||||
exclude:
|
exclude:
|
||||||
- build_type: annotations
|
- build_type: annotations
|
||||||
target: plugins
|
target: plugins
|
||||||
@ -72,8 +72,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: vendor/bundle
|
path: vendor/bundle
|
||||||
key: ${{ runner.os }}-${{ matrix.ruby }}-gem-${{ hashFiles('**/Gemfile.lock') }}
|
key: ${{ runner.os }}-${{ matrix.ruby }}-gem-${{ hashFiles('**/Gemfile.lock') }}
|
||||||
restore-keys: |
|
restore-keys: ${{ runner.os }}-${{ matrix.ruby }}-gem-
|
||||||
${{ runner.os }}-${{ matrix.ruby }}-gem-
|
|
||||||
|
|
||||||
- name: Setup gems
|
- name: Setup gems
|
||||||
run: |
|
run: |
|
||||||
@ -94,8 +93,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir.outputs.dir }}
|
path: ${{ steps.yarn-cache-dir.outputs.dir }}
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
restore-keys: |
|
restore-keys: ${{ runner.os }}-yarn-
|
||||||
${{ runner.os }}-yarn-
|
|
||||||
|
|
||||||
- name: Yarn install
|
- name: Yarn install
|
||||||
run: yarn install --frozen-lockfile
|
run: yarn install --frozen-lockfile
|
||||||
@ -113,10 +111,9 @@ jobs:
|
|||||||
id: app-cache
|
id: app-cache
|
||||||
with:
|
with:
|
||||||
path: tmp/app-cache
|
path: tmp/app-cache
|
||||||
key: >- # postgres version, hash of migrations, "parallel?"
|
key: >-
|
||||||
${{ runner.os }}-
|
${{ runner.os }}-
|
||||||
${{ hashFiles('.github/workflows/tests.yml') }}-
|
${{ hashFiles('.github/workflows/tests.yml') }}-
|
||||||
${{ matrix.postgres }}-
|
|
||||||
${{ hashFiles('db/**/*', 'plugins/**/db/**/*') }}-
|
${{ hashFiles('db/**/*', 'plugins/**/db/**/*') }}-
|
||||||
${{ env.USES_PARALLEL_DATABASES }}
|
${{ env.USES_PARALLEL_DATABASES }}
|
||||||
|
|
||||||
@ -229,7 +226,7 @@ jobs:
|
|||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
|
|
||||||
core_frontend_tests:
|
core_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 }})
|
name: core frontend (${{ matrix.browser }})
|
||||||
runs-on: ubuntu-20.04-8core
|
runs-on: ubuntu-20.04-8core
|
||||||
container:
|
container:
|
||||||
@ -267,8 +264,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir.outputs.dir }}
|
path: ${{ steps.yarn-cache-dir.outputs.dir }}
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
restore-keys: |
|
restore-keys: ${{ runner.os }}-yarn-
|
||||||
${{ runner.os }}-yarn-
|
|
||||||
|
|
||||||
- name: Yarn install
|
- name: Yarn install
|
||||||
working-directory: ./app/assets/javascripts/discourse
|
working-directory: ./app/assets/javascripts/discourse
|
||||||
@ -278,15 +274,15 @@ jobs:
|
|||||||
working-directory: ./app/assets/javascripts/discourse
|
working-directory: ./app/assets/javascripts/discourse
|
||||||
run: |
|
run: |
|
||||||
mkdir /tmp/emberbuild
|
mkdir /tmp/emberbuild
|
||||||
yarn ember build --environment=test -o /tmp/emberbuild
|
yarn ember build --environment=test -o /tmp/emberbuild
|
||||||
|
|
||||||
- name: Core QUnit
|
- name: Core QUnit
|
||||||
working-directory: ./app/assets/javascripts/discourse
|
working-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 --random
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
with:
|
with:
|
||||||
name: ember-exam-execution-${{matrix.browser}}
|
name: ember-exam-execution-${{ matrix.browser }}
|
||||||
path: ./app/assets/javascripts/discourse/test-execution-*.json
|
path: ./app/assets/javascripts/discourse/test-execution-*.json
|
||||||
|
@ -237,8 +237,8 @@ RSpec.configure do |config|
|
|||||||
|
|
||||||
WebMock.disable_net_connect!(allow_localhost: true, allow: [Webdrivers::Chromedriver.base_url])
|
WebMock.disable_net_connect!(allow_localhost: true, allow: [Webdrivers::Chromedriver.base_url])
|
||||||
|
|
||||||
if ENV["CAPBYARA_DEFAULT_MAX_WAIT_TIME"].present?
|
if ENV["CAPYBARA_DEFAULT_MAX_WAIT_TIME"].present?
|
||||||
Capybara.default_max_wait_time = ENV["CAPBYARA_DEFAULT_MAX_WAIT_TIME"].to_i
|
Capybara.default_max_wait_time = ENV["CAPYBARA_DEFAULT_MAX_WAIT_TIME"].to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
Capybara.threadsafe = true
|
Capybara.threadsafe = true
|
||||||
|
Loading…
Reference in New Issue
Block a user