dangerzone/.github/workflows
Naglis Jonaitis a4b20ae101
Avoid DUMMY_CONVERSION env var treated as bool in CI
`DUMMY_CONVERSION: True` is treated as a boolean value in YAML[1]. As a
result, during GitHub CI the environment variable setup during tests is
formatted as `DUMMY_CONVERSION=true`.

The value is used[2] in tests and passed as the `condition` to the
`pytest.mark.skipif`[3] decorator. The `skipif` `condition` can be
either a `bool` or `str`. When it is a `str` (our case, as we use
`os.environ.get()`), it is treated as a condition string[4] by pytest.

Since the condition string is `eval()`ed[5] by pytest, trying to
evaluate `true` results in:

> Failed: Error evaluating 'skipif' condition
>     true
> NameError: name 'true' is not defined

To avoid the implicit conversion to a JSON boolean, or marking the
"True" value as a string literal, use the value `1` instead.

[1]: https://yaml.org/type/bool.html
[2]: 9bb1993e77/tests/isolation_provider/base.py (L25)
[3]: https://docs.pytest.org/en/stable/reference/reference.html#pytest-mark-skipif-ref
[4]: https://docs.pytest.org/en/stable/historical-notes.html#string-conditions
[5]: f75dd87eb7/src/_pytest/skipping.py (L117)
2024-04-08 15:24:19 +03:00
..
check_push.yml ci: Improve commit message lint 2024-02-20 15:55:45 +02:00
check_repos.yml ci: Test Fedora 39 build instructions 2024-02-26 23:26:24 +02:00
ci.yml Avoid DUMMY_CONVERSION env var treated as bool in CI 2024-04-08 15:24:19 +03:00
scan.yml Bump CodeQL upload action to V3 due to deprecation 2024-02-15 14:40:33 +00:00
scan_released.yml Bump CodeQL upload action to V3 due to deprecation 2024-02-15 14:40:33 +00:00