io-aero / io-avstats

Aviation Event Statistics
Other
0 stars 0 forks source link

GitHub action (macOS): Task s_d_c is failing #128

Closed walter-weinmann closed 4 months ago

walter-weinmann commented 5 months ago
2024-04-21T15:15:14.7523340Z =================================== FAILURES ===================================
2024-04-21T15:15:14.7524240Z _____________________________ test_launcher_s_d_c ______________________________
2024-04-21T15:15:14.7524760Z 
2024-04-21T15:15:14.7525290Z command = ['./run_io_avstats_pytest.zsh', 's_d_c']
2024-04-21T15:15:14.7525910Z 
2024-04-21T15:15:14.7526300Z     def _run_command(command: list[str]) -> None:
2024-04-21T15:15:14.7526910Z         """Run shell commands safely."""
2024-04-21T15:15:14.7527440Z         try:
2024-04-21T15:15:14.7528020Z >           subprocess.run(
2024-04-21T15:15:14.7528480Z                 command,
2024-04-21T15:15:14.7529060Z                 check=True,
2024-04-21T15:15:14.7529540Z                 shell=False,  # noqa: S603
2024-04-21T15:15:14.7530070Z                 text=True,
2024-04-21T15:15:14.7530660Z                 capture_output=True,
2024-04-21T15:15:14.7531180Z             )
2024-04-21T15:15:14.7531430Z 
2024-04-21T15:15:14.7531600Z tests/test_launcher.py:26: 
2024-04-21T15:15:14.7532350Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2024-04-21T15:15:14.7532860Z 
2024-04-21T15:15:14.7533210Z input = None, capture_output = True, timeout = None, check = True
2024-04-21T15:15:14.7534120Z popenargs = (['./run_io_avstats_pytest.zsh', 's_d_c'],)
2024-04-21T15:15:14.7535200Z kwargs = {'shell': False, 'stderr': -1, 'stdout': -1, 'text': True}
2024-04-21T15:15:14.7536850Z process = <Popen: returncode: 255 args: ['./run_io_avstats_pytest.zsh', 's_d_c']>
2024-04-21T15:15:14.7537840Z stdout = '', stderr = '', retcode = 255
2024-04-21T15:15:14.7538380Z 
2024-04-21T15:15:14.7538560Z     def run(*popenargs,
2024-04-21T15:15:14.7539210Z             input=None, capture_output=False, timeout=None, check=False, **kwargs):
2024-04-21T15:15:14.7540250Z         """Run command with arguments and return a CompletedProcess instance.
2024-04-21T15:15:14.7540950Z     
2024-04-21T15:15:14.7541520Z         The returned instance will have attributes args, returncode, stdout and
2024-04-21T15:15:14.7542630Z         stderr. By default, stdout and stderr are not captured, and those attributes
2024-04-21T15:15:14.7543640Z         will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
2024-04-21T15:15:14.7544450Z         or pass capture_output=True to capture both.
2024-04-21T15:15:14.7545120Z     
2024-04-21T15:15:14.7545790Z         If check is True and the exit code was non-zero, it raises a
2024-04-21T15:15:14.7546720Z         CalledProcessError. The CalledProcessError object will have the return code
2024-04-21T15:15:14.7547960Z         in the returncode attribute, and output & stderr attributes if those streams
2024-04-21T15:15:14.7548750Z         were captured.
2024-04-21T15:15:14.7549310Z     
2024-04-21T15:15:14.7549900Z         If timeout is given, and the process takes too long, a TimeoutExpired
2024-04-21T15:15:14.7566050Z         exception will be raised.
2024-04-21T15:15:14.7566640Z     
2024-04-21T15:15:14.7567140Z         There is an optional argument "input", allowing you to
2024-04-21T15:15:14.7568380Z         pass bytes or a string to the subprocess's stdin.  If you use this argument
2024-04-21T15:15:14.7570100Z         you may not also use the Popen constructor's "stdin" argument, as
2024-04-21T15:15:14.7570970Z         it will be used internally.
2024-04-21T15:15:14.7571480Z     
2024-04-21T15:15:14.7572080Z         By default, all communication is in bytes, and therefore any "input" should
2024-04-21T15:15:14.7573130Z         be bytes, and the stdout and stderr will be bytes. If in text mode, any
2024-04-21T15:15:14.7574080Z         "input" should be a string, and stdout and stderr will be strings decoded
2024-04-21T15:15:14.7574990Z         according to locale encoding, or by "encoding" if set. Text mode is
2024-04-21T15:15:14.7575900Z         triggered by setting any of text, encoding, errors or universal_newlines.
2024-04-21T15:15:14.7576570Z     
2024-04-21T15:15:14.7577100Z         The other arguments are the same as for the Popen constructor.
2024-04-21T15:15:14.7577760Z         """
2024-04-21T15:15:14.7578110Z         if input is not None:
2024-04-21T15:15:14.7578770Z             if kwargs.get('stdin') is not None:
2024-04-21T15:15:14.7579600Z                 raise ValueError('stdin and input arguments may not both be used.')
2024-04-21T15:15:14.7580430Z             kwargs['stdin'] = PIPE
2024-04-21T15:15:14.7581050Z     
2024-04-21T15:15:14.7581440Z         if capture_output:
2024-04-21T15:15:14.7582270Z             if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
2024-04-21T15:15:14.7583320Z                 raise ValueError('stdout and stderr arguments may not be used '
2024-04-21T15:15:14.7584190Z                                  'with capture_output.')
2024-04-21T15:15:14.7584870Z             kwargs['stdout'] = PIPE
2024-04-21T15:15:14.7585500Z             kwargs['stderr'] = PIPE
2024-04-21T15:15:14.7585930Z     
2024-04-21T15:15:14.7586350Z         with Popen(*popenargs, **kwargs) as process:
2024-04-21T15:15:14.7587080Z             try:
2024-04-21T15:15:14.7587640Z                 stdout, stderr = process.communicate(input, timeout=timeout)
2024-04-21T15:15:14.7588540Z             except TimeoutExpired as exc:
2024-04-21T15:15:14.7589100Z                 process.kill()
2024-04-21T15:15:14.7589550Z                 if _mswindows:
2024-04-21T15:15:14.7590110Z                     # Windows accumulates the output in a single blocking
2024-04-21T15:15:14.7591590Z                     # read() call run on child threads, with the timeout
2024-04-21T15:15:14.7592390Z                     # being done in a join() on those threads.  communicate()
2024-04-21T15:15:14.7593140Z                     # _after_ kill() is required to collect that and add it
2024-04-21T15:15:14.7593780Z                     # to the exception.
2024-04-21T15:15:14.7594400Z                     exc.stdout, exc.stderr = process.communicate()
2024-04-21T15:15:14.7595020Z                 else:
2024-04-21T15:15:14.7595540Z                     # POSIX _communicate already populated the output so
2024-04-21T15:15:14.7596370Z                     # far into the TimeoutExpired exception.
2024-04-21T15:15:14.7597010Z                     process.wait()
2024-04-21T15:15:14.7597460Z                 raise
2024-04-21T15:15:14.7598190Z             except:  # Including KeyboardInterrupt, communicate handled that.
2024-04-21T15:15:14.7600580Z                 process.kill()
2024-04-21T15:15:14.7602210Z                 # We don't call process.wait() as .__exit__ does that for us.
2024-04-21T15:15:14.7603000Z                 raise
2024-04-21T15:15:14.7603430Z             retcode = process.poll()
2024-04-21T15:15:14.7603950Z             if check and retcode:
2024-04-21T15:15:14.7604740Z >               raise CalledProcessError(retcode, process.args,
2024-04-21T15:15:14.7605440Z                                          output=stdout, stderr=stderr)
2024-04-21T15:15:14.7606710Z E               subprocess.CalledProcessError: Command '['./run_io_avstats_pytest.zsh', 's_d_c']' returned non-zero exit status 255.
2024-04-21T15:15:14.7607510Z 
2024-04-21T15:15:14.7608610Z ../../../miniconda3/envs/ioavstats/lib/python3.12/subprocess.py:571: CalledProcessError
2024-04-21T15:15:14.7609250Z 
2024-04-21T15:15:14.7609620Z During handling of the above exception, another exception occurred:
2024-04-21T15:15:14.7610120Z 
2024-04-21T15:15:14.7610460Z     def test_launcher_s_d_c() -> None:
2024-04-21T15:15:14.7611120Z         """Test case: Set up the PostgreSQL database container."""
2024-04-21T15:15:14.7612100Z         assert settings.check_value == "test", "Settings check_value is not 'test'"
2024-04-21T15:15:14.7612980Z     
2024-04-21T15:15:14.7613340Z         commands = {
2024-04-21T15:15:14.7613860Z             "Darwin": ["./run_io_avstats_pytest.zsh", "s_d_c"],
2024-04-21T15:15:14.7614710Z             "Linux": ["./run_io_avstats_pytest.sh", "s_d_c"],
2024-04-21T15:15:14.7615460Z             "Windows": ["cmd.exe", "/c", "run_io_avstats_pytest.bat", "s_d_c"],
2024-04-21T15:15:14.7616240Z         }
2024-04-21T15:15:14.7616720Z         command = commands.get(platform.system())
2024-04-21T15:15:14.7617260Z         if not command:
2024-04-21T15:15:14.7617900Z             pytest.fail(io_glob.FATAL_00_908.replace("{os}", platform.system()))
2024-04-21T15:15:14.7618560Z     
2024-04-21T15:15:14.7618910Z >       _run_command(command)
2024-04-21T15:15:14.7619230Z 
2024-04-21T15:15:14.7619410Z tests/test_launcher.py:145: 
2024-04-21T15:15:14.7620010Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2024-04-21T15:15:14.7620470Z 
2024-04-21T15:15:14.7620880Z command = ['./run_io_avstats_pytest.zsh', 's_d_c']
2024-04-21T15:15:14.7621300Z 
2024-04-21T15:15:14.7621670Z     def _run_command(command: list[str]) -> None:
2024-04-21T15:15:14.7622370Z         """Run shell commands safely."""
2024-04-21T15:15:14.7622830Z         try:
2024-04-21T15:15:14.7623170Z             subprocess.run(
2024-04-21T15:15:14.7623570Z                 command,
2024-04-21T15:15:14.7624230Z                 check=True,
2024-04-21T15:15:14.7624750Z                 shell=False,  # noqa: S603
2024-04-21T15:15:14.7625280Z                 text=True,
2024-04-21T15:15:14.7625740Z                 capture_output=True,
2024-04-21T15:15:14.7626220Z             )
2024-04-21T15:15:14.7626630Z         except subprocess.CalledProcessError as e:
2024-04-21T15:15:14.7627160Z             print(  # noqa: T201
2024-04-21T15:15:14.7627860Z                 f"test_launcher - stdout: '{e.stdout}'",
2024-04-21T15:15:14.7629130Z             )  # Print stdout for additional context
2024-04-21T15:15:14.7629680Z             print(  # noqa: T201
2024-04-21T15:15:14.7630270Z                 f"test_launcher - stderr: '{e.stderr}'",
2024-04-21T15:15:14.7630890Z             )  # This will print the error output
2024-04-21T15:15:14.7631390Z >           pytest.fail(
2024-04-21T15:15:14.7632050Z                 f"test_launcher - command failed with exit code: {e.returncode}",
2024-04-21T15:15:14.7632630Z             )
2024-04-21T15:15:14.7633190Z E           Failed: test_launcher - command failed with exit code: 255
2024-04-21T15:15:14.7633650Z 
2024-04-21T15:15:14.7633790Z tests/test_launcher.py:40: Failed
2024-04-21T15:15:14.7634460Z ----------------------------- Captured stdout call -----------------------------
2024-04-21T15:15:14.7635110Z test_launcher - stdout: ''
2024-04-21T15:15:14.7635560Z test_launcher - stderr: ''
2024-04-21T15:15:14.7635800Z 
2024-04-21T15:15:14.7636200Z ---------- coverage: platform darwin, python 3.12.3-final-0 ----------
2024-04-21T15:15:14.7636870Z Name                                           Stmts   Miss  Cover   Missing
2024-04-21T15:15:14.7637600Z ----------------------------------------------------------------------------
2024-04-21T15:15:14.7638500Z ioavstats/Menu.py                                 17     17     0%   7-43
2024-04-21T15:15:14.7639210Z ioavstats/__init__.py                              1      1     0%   4
2024-04-21T15:15:14.7640040Z ioavstats/avstats.py                             182    182     0%   4-704
2024-04-21T15:15:14.7640920Z ioavstats/code_generator.py                      111    111     0%   4-199
2024-04-21T15:15:14.7642230Z ioavstats/db_ddl_base.py                         553    553     0%   4-3627
2024-04-21T15:15:14.7643100Z ioavstats/db_dml_base.py                         712    712     0%   4-2376
2024-04-21T15:15:14.7643960Z ioavstats/db_dml_corr.py                         467    467     0%   4-1343
2024-04-21T15:15:14.7644840Z ioavstats/db_dml_msaccess.py                     733    733     0%   4-3596
2024-04-21T15:15:14.7645720Z ioavstats/glob_local.py                          195    195     0%   4-309
2024-04-21T15:15:14.7646640Z ioavstats/pages/Association_Rule_Analysis.py    1323   1323     0%   7-4221
2024-04-21T15:15:14.7647590Z ioavstats/pages/Aviation_Event_Analysis.py      1319   1319     0%   7-4610
2024-04-21T15:15:14.7648540Z ioavstats/pages/Database_Profiling.py            149    149     0%   7-778
2024-04-21T15:15:14.7649320Z ioavstats/pages/__init__.py                        1      1     0%   4
2024-04-21T15:15:14.7650180Z ioavstats/user_guide.py                           22     22     0%   4-148
2024-04-21T15:15:14.7651040Z ioavstats/utils.py                                54     54     0%   4-267
2024-04-21T15:15:14.7651900Z ioavstats/utils_msaccess.py                       13     13     0%   4-47
2024-04-21T15:15:14.7652710Z ----------------------------------------------------------------------------
2024-04-21T15:15:14.7653330Z TOTAL                                           5852   5852     0%
2024-04-21T15:15:14.7653710Z 
2024-04-21T15:15:14.7653950Z =========================== short test summary info ============================
2024-04-21T15:15:14.7655070Z FAILED tests/test_launcher.py::test_launcher_s_d_c - Failed: test_launcher - command failed with exit code: 255
2024-04-21T15:15:14.7656000Z ======================== 1 failed, 14 skipped in 1.28s =========================
walter-weinmann commented 4 months ago

Docker installation with GitHub actions and macOS is currently not possible.