From 63e6054287deb8be25c2584e1c0bd32e9399914e Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Mon, 25 Mar 2024 15:53:49 +0900 Subject: [PATCH] Run check.rb on CI --- .github/workflows/main.yml | 3 +++ client/rb_client/check.rb | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 client/rb_client/check.rb diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2dff752..8daf78c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,6 +43,9 @@ jobs: - name: Run Composer build tasks run: composer build:all + - name: Run check.rb + run: ruby client/rb_client/check.rb + - name: Start server in background run: | composer serve > /dev/null 2>&1 & diff --git a/client/rb_client/check.rb b/client/rb_client/check.rb new file mode 100644 index 0000000..c3ee9f2 --- /dev/null +++ b/client/rb_client/check.rb @@ -0,0 +1,23 @@ +# Check versions of Ruby and gems +puts "Ruby version: #{RUBY_VERSION}" +puts "Installed gems:" +puts `gem list` + +# Check environment variables +puts "Environment variables:" +puts ENV.to_h + +# Check existence and content of important files +files_to_check = [ + "/path/to/file1", + "/path/to/file2", +# add more file paths here +] +files_to_check.each do |file| + if File.exist?(file) + puts "Content of #{file}:" + puts File.read(file) + else + puts "File #{file} does not exist" + end +end \ No newline at end of file