Skip to content

Commit

Permalink
[build] update rake task names
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Jan 22, 2024
1 parent 5040a5a commit fa0637a
Showing 1 changed file with 22 additions and 15 deletions.
37 changes: 22 additions & 15 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,10 @@ namespace :py do
sh "python3 -m twine upload bazel-bin/py/selenium-#{python_version}.tar.gz"
end

desc 'Update generated Python files for local development'
task :update do
desc 'generate and copy files required for local development'
task :local_dev do
Bazel.execute('build', [], '//py:selenium')
Rake::Task['grid'].invoke

FileUtils.rm_rf('py/selenium/webdriver/common/devtools/')
FileUtils.cp_r('bazel-bin/py/selenium/webdriver/.', 'py/selenium/webdriver', remove_destination: true)
Expand Down Expand Up @@ -674,22 +675,28 @@ namespace :py do
sh 'tox -c py/tox.ini -e linting'
end

namespace :test do
desc 'Python unit tests'
task :unit do
namespace :test do
desc 'Python unit tests'
task :unit do
Rake::Task['py:clean'].invoke
Bazel.execute('test', ['--test_size_filters=small'], '//py/...')
end

%i[chrome edge firefox safari].each do |browser|
desc "Python #{browser} tests"
task browser do
Rake::Task['py:clean'].invoke
Bazel.execute('test', ['--test_size_filters=small'], '//py/...')
Bazel.execute('test', [],"//py:common-#{browser}")
Bazel.execute('test', [],"//py:test-#{browser}")
end
end

%i[chrome edge firefox safari].each do |browser|
desc "Python #{browser} tests"
task browser do
Rake::Task['py:clean'].invoke
Bazel.execute('test', [],"//py:common-#{browser}")
Bazel.execute('test', [],"//py:test-#{browser}")
end
end
desc "Python Remote tests with Firefox"
task :remote do
Rake::Task['py:clean'].invoke
Bazel.execute('test', [],"//py:test-remote")
end
end
end

def ruby_version
Expand All @@ -706,7 +713,7 @@ namespace :rb do
end

desc 'Update generated Ruby files for local development'
task :update do
task :local_dev do
Bazel.execute('build', [], '@bundle//:bundle')
Rake::Task['rb:build'].invoke
Rake::Task['grid'].invoke
Expand Down

0 comments on commit fa0637a

Please sign in to comment.