Tagging

Weaver provides some constructs to dynamically tag tests as ignored or cancelled :

import weaver._
import cats.effect.IO
import cats.syntax.all._

object TaggingSuite extends SimpleIOSuite {

  test("Only on CI") {
    for {
      onCI <- IO(sys.env.get("CI").isDefined)
      _    <- ignore("not on CI").unlessA(onCI)
      x    <- IO.delay(1)
      y    <- IO.delay(2)
    } yield expect(x == y)
  }

  test("Another on CI") {
    for {
      onCI <- IO(sys.env.get("CI").isDefined)
      _    <- cancel("not on CI").unlessA(onCI)
      x    <- IO.delay(1)
      y    <- IO.delay(2)
    } yield expect(x == y)
  }

}
repl.MdocSessionMdocAppTaggingSuite
Only on CI 13ms
Another on CI 10ms

*************FAILURES*************
repl.MdocSessionMdocAppTaggingSuite
Only on CI 13ms
  assertion failed (tagging.md:25) Another on CI 10ms
  assertion failed (tagging.md:34) Total 2, Failed 2, Passed 0, Ignored 0, Cancelled 0