DEV: Fix incorrect github.ref value in tests workflow (#28902)

This commit is contained in:
Alan Guo Xiang Tan 2024-09-13 14:24:42 +08:00 committed by GitHub
parent e9b7663798
commit 9a4f71353d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ jobs:
build: build:
if: github.event_name == 'pull_request' || github.repository != 'discourse/discourse-private-mirror' if: github.event_name == 'pull_request' || github.repository != 'discourse/discourse-private-mirror'
name: ${{ matrix.target }} ${{ matrix.build_type }} # Update fetch-job-id step if changing this name: ${{ matrix.target }} ${{ matrix.build_type }} # Update fetch-job-id step if changing this
runs-on: ${{ (github.ref == 'refs/main/head') && 'debian-12' || 'ubuntu-22.04-8core' }} runs-on: ${{ ((github.ref == 'refs/heads/main') && 'debian-12') || 'ubuntu-22.04-8core' }}
container: discourse/discourse_test:slim${{ (matrix.build_type == 'frontend' || matrix.build_type == 'system') && '-browsers' || '' }} container: discourse/discourse_test:slim${{ (matrix.build_type == 'frontend' || matrix.build_type == 'system') && '-browsers' || '' }}
timeout-minutes: 20 timeout-minutes: 20
@ -41,7 +41,7 @@ jobs:
USES_PARALLEL_DATABASES: ${{ matrix.build_type == 'backend' || matrix.build_type == 'system' }} USES_PARALLEL_DATABASES: ${{ matrix.build_type == 'backend' || matrix.build_type == 'system' }}
CAPYBARA_DEFAULT_MAX_WAIT_TIME: 10 CAPYBARA_DEFAULT_MAX_WAIT_TIME: 10
MINIO_RUNNER_LOG_LEVEL: DEBUG MINIO_RUNNER_LOG_LEVEL: DEBUG
DISCOURSE_TURBO_RSPEC_RETRY_AND_LOG_FLAKY_TESTS: ${{ (matrix.build_type == 'system' || matrix.build_type == 'backend') && github.ref == 'refs/main/head' }} DISCOURSE_TURBO_RSPEC_RETRY_AND_LOG_FLAKY_TESTS: ${{ (matrix.build_type == 'system' || matrix.build_type == 'backend') && github.ref == 'refs/heads/main' && '1' }}
CHEAP_SOURCE_MAPS: "1" CHEAP_SOURCE_MAPS: "1"
TESTEM_DEFAULT_BROWSER: Chrome TESTEM_DEFAULT_BROWSER: Chrome
@ -358,7 +358,7 @@ jobs:
core_frontend_tests: core_frontend_tests:
if: github.event_name == 'pull_request' || 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: ${{ (github.ref == 'refs/main/head' ) && 'debian-12' || 'ubuntu-22.04-8core' }} runs-on: ${{ ((github.ref == 'refs/heads/main') && 'debian-12') || 'ubuntu-22.04-8core' }}
container: container:
image: discourse/discourse_test:slim-browsers image: discourse/discourse_test:slim-browsers
options: --user discourse options: --user discourse

View File

@ -16,7 +16,7 @@ profile_print_slowest_examples_count = 10
use_runtime_info = nil use_runtime_info = nil
enable_system_tests = nil enable_system_tests = nil
disable_system_tests = nil disable_system_tests = nil
retry_and_log_flaky_tests = !!ENV["DISCOURSE_TURBO_RSPEC_RETRY_AND_LOG_FLAKY_TESTS"] retry_and_log_flaky_tests = ENV["DISCOURSE_TURBO_RSPEC_RETRY_AND_LOG_FLAKY_TESTS"].to_s == "1"
OptionParser OptionParser
.new do |opts| .new do |opts|