Skip to content

Commit f80a99b

Browse files
committed
Add vscode tasks
1 parent da2408c commit f80a99b

File tree

2 files changed

+124
-53
lines changed

2 files changed

+124
-53
lines changed

.vscode/tasks.json

Lines changed: 123 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,125 @@
11
{
2-
"version": "2.0.0",
3-
"tasks": [
4-
{
5-
"label": "run app",
6-
"type": "shell",
7-
"command": "dotnet run watch --project src/Api/Api.csproj",
8-
"problemMatcher": "$msCompile",
9-
"group": "build"
10-
},
11-
{
12-
"label": "build solution",
13-
"type": "shell",
14-
"command": "dotnet build",
15-
"problemMatcher": "$msCompile",
16-
"group": "build"
17-
},
18-
{
19-
"label": "clean solution",
20-
"type": "shell",
21-
"command": "dotnet clean",
22-
"problemMatcher": "$msCompile",
23-
"group": "build"
24-
},
25-
{
26-
"label": "restore solution",
27-
"type": "shell",
28-
"command": "dotnet restore",
29-
"problemMatcher": "$msCompile",
30-
"group": "build"
31-
},
32-
{
33-
"label": "test solution",
34-
"type": "shell",
35-
"command": "dotnet test",
36-
"problemMatcher": "$msCompile",
37-
"group": "build"
38-
},
39-
{
40-
"label": "list outdated",
41-
"type": "shell",
42-
"command": "dotnet list package --outdated",
43-
"problemMatcher": "$msCompile",
44-
"group": "build"
45-
},
46-
{
47-
"label": "list vulnerable",
48-
"type": "shell",
49-
"command": "dotnet list package --vulnerable --include-transitive",
50-
"problemMatcher": "$msCompile",
51-
"group": "build"
52-
},
53-
]
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "run terminal",
6+
"type": "shell",
7+
"command": "dotnet run watch --project src/Api/Api.csproj",
8+
"problemMatcher": "$msCompile",
9+
"group": "build"
10+
},
11+
{
12+
"label": "run docker",
13+
"type": "shell",
14+
"command": "docker compose up --build",
15+
"problemMatcher": "$msCompile",
16+
"group": "build"
17+
},
18+
{
19+
"label": "run app",
20+
"type": "shell",
21+
"command": "dotnet run watch --project src/Api/Api.csproj",
22+
"problemMatcher": "$msCompile",
23+
"group": "build"
24+
},
25+
{
26+
"label": "build solution",
27+
"type": "shell",
28+
"command": "dotnet build",
29+
"problemMatcher": "$msCompile",
30+
"group": "build"
31+
},
32+
{
33+
"label": "clean solution",
34+
"type": "shell",
35+
"command": "dotnet clean",
36+
"problemMatcher": "$msCompile",
37+
"group": "build"
38+
},
39+
{
40+
"label": "restore solution",
41+
"type": "shell",
42+
"command": "dotnet restore",
43+
"problemMatcher": "$msCompile",
44+
"group": "build"
45+
},
46+
{
47+
"label": "run tests",
48+
"type": "shell",
49+
"command": "dotnet test",
50+
"problemMatcher": "$msCompile",
51+
"group": "build"
52+
},
53+
{
54+
"label": "list outdated",
55+
"type": "shell",
56+
"command": "dotnet list package --outdated",
57+
"problemMatcher": "$msCompile",
58+
"group": "build"
59+
},
60+
{
61+
"label": "list vulnerable",
62+
"type": "shell",
63+
"command": "dotnet list package --vulnerable --include-transitive",
64+
"problemMatcher": "$msCompile",
65+
"group": "build"
66+
},
67+
{
68+
"label": "show coverage",
69+
"type": "shell",
70+
"command": "./coverage.ps1",
71+
"problemMatcher": "$msCompile",
72+
"dependsOn": ["build solution"],
73+
"presentation": {
74+
"close": true,
75+
"reveal": "always"
76+
},
77+
"options": {
78+
"shell": {
79+
"executable": "powershell.exe"
80+
}
81+
},
82+
"group": "build"
83+
},
84+
{
85+
"label": "terraform init",
86+
"type": "shell",
87+
"command": "terraform init",
88+
"problemMatcher": "$msCompile",
89+
"options": {
90+
"cwd": "${workspaceFolder}/terraform"
91+
},
92+
"group": "build"
93+
},
94+
{
95+
"label": "terraform format",
96+
"type": "shell",
97+
"command": "terraform fmt",
98+
"problemMatcher": "$msCompile",
99+
"options": {
100+
"cwd": "${workspaceFolder}/terraform"
101+
},
102+
"group": "build"
103+
},
104+
{
105+
"label": "terraform plan",
106+
"type": "shell",
107+
"command": "terraform plan -out=tfplan",
108+
"problemMatcher": "$msCompile",
109+
"options": {
110+
"cwd": "${workspaceFolder}/terraform"
111+
},
112+
"group": "build"
113+
},
114+
{
115+
"label": "terraform apply",
116+
"type": "shell",
117+
"command": "terraform apply tfplan",
118+
"problemMatcher": "$msCompile",
119+
"options": {
120+
"cwd": "${workspaceFolder}/terraform"
121+
},
122+
"group": "build"
123+
},
124+
]
54125
}

coverage.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
dotnet test -c Release --no-restore --no-build -- --coverage --coverage-output-format xml --coverage-output coverage.xml
1+
dotnet test -c Debug --no-restore --no-build -- --coverage --coverage-output-format xml --coverage-output coverage.xml
22

33
$coverageFiles = Get-ChildItem -Path "tests" -Recurse -Filter "coverage.xml"
44

0 commit comments

Comments
 (0)