Makefile.toml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. [config]
  2. default_to_workspace = false
  3. min_version = "0.32.4"
  4. [env]
  5. CARGO_MAKE_CLIPPY_ARGS = "-- --deny=warnings"
  6. CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
  7. [config.modify_core_tasks]
  8. namespace = "core"
  9. private = true
  10. [tasks.tests-setup]
  11. private = true
  12. script = [
  13. """
  14. test_flags = array --headless --firefox
  15. dioxus_test_features = set wasm_test
  16. dioxus_test_flags = array_join ${test_flags} " "
  17. echo "running tests with flags: ${dioxus_test_flags} and features: ${dioxus_test_features}"
  18. set_env DIOXUS_TEST_FLAGS ${dioxus_test_flags}
  19. set_env DIOXUS_TEST_FEATURES ${dioxus_test_features}
  20. """,
  21. ]
  22. script_runner = "@duckscript"
  23. [tasks.format]
  24. command = "cargo"
  25. args = ["fmt", "--all"]
  26. [tasks.check]
  27. command = "cargo"
  28. args = ["check", "--workspace", "--examples", "--tests"]
  29. [tasks.clippy]
  30. command = "cargo"
  31. args = [
  32. "clippy",
  33. "--workspace",
  34. "--examples",
  35. "--tests",
  36. "--",
  37. "-D",
  38. "warnings",
  39. ]
  40. [tasks.tidy]
  41. category = "Formatting"
  42. dependencies = ["format", "check", "clippy"]
  43. description = "Format and Check workspace"
  44. [tasks.tests]
  45. category = "Testing"
  46. dependencies = ["tests-setup"]
  47. description = "Run all tests"
  48. env = { CARGO_MAKE_WORKSPACE_SKIP_MEMBERS = ["**/examples/*"] }
  49. run_task = { name = ["test-flow", "test-with-browser"], fork = true }
  50. [tasks.build]
  51. command = "cargo"
  52. args = ["build"]
  53. [tasks.test-flow]
  54. dependencies = ["test", "docs"]
  55. private = true
  56. [tasks.test]
  57. dependencies = ["build"]
  58. command = "cargo"
  59. args = [
  60. "test",
  61. "--lib",
  62. "--bins",
  63. "--tests",
  64. "--examples",
  65. "--workspace",
  66. # These tests run on Ubuntu without a screen. Desktop tests that require a screen fail, so we skip them
  67. "--exclude",
  68. "dioxus-desktop",
  69. "--exclude",
  70. "dioxus-mobile",
  71. ]
  72. private = true
  73. [tasks.docs]
  74. dependencies = ["build"]
  75. command = "cargo"
  76. args = [
  77. "test",
  78. "--doc",
  79. "--workspace",
  80. "--all-features",
  81. ]
  82. private = true
  83. [tasks.test-with-browser]
  84. env = { CARGO_MAKE_WORKSPACE_INCLUDE_MEMBERS = [
  85. "**/packages/router",
  86. "**/packages/desktop",
  87. ] }
  88. private = true
  89. workspace = true