mirror of https://github.com/rails/rails
Conditionally skip test job in ci.yml (#51289)
Skip generating a `test` job in ci.yml when a new application is generated with the `--skip-test` option. Co-authored-by: Rafael Mendonça França <rafael@rubyonrails.org>
This commit is contained in:
parent
98b3183356
commit
7242fd7f5c
|
@ -1,3 +1,8 @@
|
|||
* Skip generating a `test` job in ci.yml when a new application is generated with the
|
||||
`--skip-test` option.
|
||||
|
||||
*Steve Polito*
|
||||
|
||||
* Update the `.node-version` file conditionally generated for new applications to 20.11.1
|
||||
|
||||
*Steve Polito*
|
||||
|
|
|
@ -59,6 +59,7 @@ jobs:
|
|||
run: bin/rubocop -f github
|
||||
|
||||
<% end -%>
|
||||
<% unless options[:skip_test] -%>
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
@ -134,3 +135,4 @@ jobs:
|
|||
name: screenshots
|
||||
path: ${{ github.workspace }}/tmp/screenshots
|
||||
if-no-files-found: ignore
|
||||
<% end -%>
|
||||
|
|
|
@ -534,6 +534,10 @@ class AppGeneratorTest < Rails::Generators::TestCase
|
|||
assert_no_gem "selenium-webdriver"
|
||||
|
||||
assert_no_directory("test")
|
||||
|
||||
assert_file ".github/workflows/ci.yml" do |file|
|
||||
assert_no_match(/test:.\s*runs-on/m, file)
|
||||
end
|
||||
end
|
||||
|
||||
def test_generator_if_skip_jbuilder_is_given
|
||||
|
|
Loading…
Reference in New Issue