Skip to content

Commit

Permalink
Use ruby-3.3.5, py3.12 (#212)
Browse files Browse the repository at this point in the history
* Update CI: use ruby-3.3.5, py3.12

* Revert to py 3.11

* Bump 1.31.1

* Try to wait after kill to avoid 'Address already in use' in CI tests

* Use kill instead of term

* Try to fix again

* Try to fix again

* Upgrade to openturns 1.23

* Revert openturns version to 1.21

* Run CI tests in verbose mode

* Fix stupid bug
  • Loading branch information
relf authored Oct 15, 2024
1 parent b952d6d commit 4cc44a8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Ruby and install gems
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.0'
ruby-version: '3.3.5'
bundler-cache: true

- name: Set up Python 3.11
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
- name: Run tests
run: |
echo $PATH
WHATSOPT_COVERALLS=1 bundle exec rails test
WHATSOPT_COVERALLS=1 bundle exec rails test --verbose
- name: Coveralls
uses: coverallsapp/github-action@v2
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.31.0
1.31.1
1 change: 1 addition & 0 deletions app/lib/whats_opt/service_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def self.shutdown_server(host: DEFAULT_HOST, port: DEFAULT_PORT)
Rails.logger.warn e
else
transport.close()
self.kill_server(@pid)
end

def self.kill_server(pid)
Expand Down
24 changes: 12 additions & 12 deletions test/lib/whats_opt/openmdao_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ def _assert_file_generation(expected, with_server: false, with_egmdo: false, wit
ok, log = @ogen_remote.run
assert ok
assert log
Process.kill("TERM", pid)
Process.waitpid pid
Process.kill("KILL", pid)
Process.waitpid pid; sleep(1)
end
end

Expand All @@ -252,8 +252,8 @@ def _assert_file_generation(expected, with_server: false, with_egmdo: false, wit
ok, log = @ogen_remote.run
assert ok
assert log
Process.kill("TERM", pid)
Process.waitpid pid
Process.kill("KILL", pid)
Process.waitpid pid; sleep(1)
end
end

Expand All @@ -271,8 +271,8 @@ def _assert_file_generation(expected, with_server: false, with_egmdo: false, wit
assert log
assert File.exist?("cicav_doe.sqlite")
File.delete("cicav_doe.sqlite") if File.exist?("cicav_doe.sqlite")
Process.kill("TERM", pid)
Process.waitpid pid
Process.kill("KILL", pid)
Process.waitpid pid; sleep(1)
end
end

Expand All @@ -291,8 +291,8 @@ def _assert_file_generation(expected, with_server: false, with_egmdo: false, wit
assert log
assert File.exist?("singleton_uq_doe.sqlite")
File.delete("singleton_uq_doe.sqlite") if File.exist?("singleton_uq_doe.sqlite")
Process.kill("TERM", pid)
Process.waitpid pid
Process.kill("KILL", pid)
Process.waitpid pid; sleep(1)
end
end

Expand Down Expand Up @@ -375,8 +375,8 @@ def _assert_file_generation(expected, with_server: false, with_egmdo: false, wit
ok, log = @ogen_remote.run
assert ok
assert log
Process.kill("TERM", pid)
Process.waitpid pid
Process.kill("KILL", pid)
Process.waitpid pid; sleep(1)
end
end

Expand All @@ -393,8 +393,8 @@ def _assert_file_generation(expected, with_server: false, with_egmdo: false, wit
ok, log = @ogen_remote.run
assert ok
assert log
Process.kill("TERM", pid)
Process.waitpid pid
Process.kill("KILL", pid)
Process.waitpid pid; sleep(1)
end
end

Expand Down

0 comments on commit 4cc44a8

Please sign in to comment.