|
| 1 | +version: '3' |
| 2 | + |
| 3 | +vars: |
| 4 | + SOLUTION: ModularityKit.Mutator.slnx |
| 5 | + CONFIGURATION: '{{default "Release" .CONFIGURATION}}' |
| 6 | + CORE_TEST_PROJECT: Tests/ModularityKit.Mutator.Tests/ModularityKit.Mutator.Tests.csproj |
| 7 | + GOVERNANCE_TEST_PROJECT: Tests/ModularityKit.Mutator.Governance.Tests/ModularityKit.Mutator.Governance.Tests.csproj |
| 8 | + GOVERNANCE_REDIS_TEST_PROJECT: Tests/ModularityKit.Mutator.Governance.Redis.Tests/ModularityKit.Mutator.Governance.Redis.Tests.csproj |
| 9 | + SMOKE_TEST_PROJECT: Tests/ModularityKit.Mutator.Examples.SmokeTests/ModularityKit.Mutator.Examples.SmokeTests.csproj |
| 10 | + |
| 11 | +tasks: |
| 12 | + default: |
| 13 | + desc: List available repository tasks |
| 14 | + cmds: |
| 15 | + - task --list-all |
| 16 | + silent: true |
| 17 | + |
| 18 | + restore: |
| 19 | + desc: Restore the solution |
| 20 | + cmds: |
| 21 | + - dotnet restore {{.SOLUTION}} |
| 22 | + |
| 23 | + clean: |
| 24 | + desc: Clean the solution |
| 25 | + cmds: |
| 26 | + - dotnet clean {{.SOLUTION}} -c {{.CONFIGURATION}} |
| 27 | + |
| 28 | + build: |
| 29 | + desc: Build the solution |
| 30 | + deps: [restore] |
| 31 | + cmds: |
| 32 | + - dotnet build {{.SOLUTION}} -c {{.CONFIGURATION}} --no-restore |
| 33 | + |
| 34 | + test: |
| 35 | + desc: Run the main test packages and smoke tests |
| 36 | + deps: |
| 37 | + - test:core |
| 38 | + - test:governance |
| 39 | + - test:governance:redis |
| 40 | + - test:smoke |
| 41 | + |
| 42 | + test:core: |
| 43 | + desc: Run core runtime tests |
| 44 | + deps: [restore] |
| 45 | + cmds: |
| 46 | + - dotnet test {{.CORE_TEST_PROJECT}} -c {{.CONFIGURATION}} --no-restore |
| 47 | + |
| 48 | + test:governance: |
| 49 | + desc: Run governance tests |
| 50 | + deps: [restore] |
| 51 | + cmds: |
| 52 | + - dotnet test {{.GOVERNANCE_TEST_PROJECT}} -c {{.CONFIGURATION}} --no-restore |
| 53 | + |
| 54 | + test:governance:redis: |
| 55 | + desc: Run Redis governance tests |
| 56 | + deps: [restore] |
| 57 | + cmds: |
| 58 | + - dotnet test {{.GOVERNANCE_REDIS_TEST_PROJECT}} -c {{.CONFIGURATION}} --no-restore |
| 59 | + |
| 60 | + test:smoke: |
| 61 | + desc: Run example smoke tests |
| 62 | + deps: [restore] |
| 63 | + cmds: |
| 64 | + - dotnet test {{.SMOKE_TEST_PROJECT}} -c {{.CONFIGURATION}} --no-restore |
| 65 | + |
| 66 | + test:project: |
| 67 | + desc: Run a specific test project with an optional filter |
| 68 | + deps: [restore] |
| 69 | + preconditions: |
| 70 | + - sh: test -n "{{.PROJECT}}" |
| 71 | + msg: 'PROJECT is required. Example: task test:project PROJECT=Tests/ModularityKit.Mutator.Tests/ModularityKit.Mutator.Tests.csproj' |
| 72 | + cmds: |
| 73 | + - > |
| 74 | + dotnet test {{.PROJECT}} -c {{.CONFIGURATION}} --no-restore{{if .FILTER}} --filter "{{.FILTER}}"{{end}} |
| 75 | +
|
| 76 | + format: |
| 77 | + desc: Format the solution |
| 78 | + deps: [restore] |
| 79 | + cmds: |
| 80 | + - dotnet format {{.SOLUTION}} |
| 81 | + |
| 82 | + deps: |
| 83 | + desc: Run dependency health checks |
| 84 | + deps: [restore] |
| 85 | + cmds: |
| 86 | + - python3 -m scripts.dependencies.check_package_health --solution {{.SOLUTION}} |
| 87 | + |
| 88 | + docs: |
| 89 | + desc: Build the DocFX site |
| 90 | + cmds: |
| 91 | + - dotnet tool update -g docfx |
| 92 | + - dotnet build {{.SOLUTION}} -c {{.CONFIGURATION}} |
| 93 | + - docfx docfx.json |
| 94 | + |
| 95 | + verify: |
| 96 | + desc: Run the common local verification workflow |
| 97 | + deps: |
| 98 | + - build |
| 99 | + - deps |
| 100 | + - test |
0 commit comments