Skip to content

Commit 65a6aa1

Browse files
authored
Adding support for Go language. (#19941)
* Adding support for Go language. * extra commit * Adding support for go language. * Adding support for go language. * Adding support of GO language. * Adding support for Go language
1 parent 78b51e7 commit 65a6aa1

16 files changed

+103
-34
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import tl = require('azure-pipelines-task-lib/task');
2+
import utils = require('../utils');
3+
import constants = require('../constants');
4+
5+
export async function executeGoTests(testsToBeExecuted: string[]): Promise<number> {
6+
7+
//Go execution will be added
8+
/*executable = go;
9+
args = test, ./...
10+
spawn*/
11+
12+
console.log("Go changes1");
13+
return 1;
14+
}
15+

Tasks/AzureTestPlanV0/automatedTestInvoker.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { executePythonTests } from './Invokers/pythoninvoker'
33
import { executeMavenTests } from './Invokers/maveninvoker'
44
import { executeGradleTests } from './Invokers/gradleinvoker'
55
import { ciDictionary } from './ciEventLogger';
6-
6+
import { executeGoTests } from './Invokers/goinvoker';
77
export async function testInvoker(testsToBeExecuted: string[], ciData: ciDictionary): Promise<number> {
88

99
const testLanguageStrings = tl.getDelimitedInput('testLanguageInput', ',', true);
@@ -37,6 +37,12 @@ export async function testInvoker(testsToBeExecuted: string[], ciData: ciDiction
3737
ciData["isPythonExecution"] = true;
3838
break;
3939

40+
case 'Go':
41+
exitCode = await executeGoTests(testsToBeExecuted);
42+
tl.debug(`Execution Status Code for Go: ${exitCode}`);
43+
ciData["isGoExecution"] = true;
44+
break;
45+
4046
default:
4147
console.log('Invalid test Language Input selected.');
4248
ciData["NoLanguageInput"] = true;

Tasks/AzureTestPlanV0/constants.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ export const NOT_AUTOMATED = 'Not Automated'
1111
export const MERGE_THRESHOLD = 100;
1212
export const AUTOMATED_EXECUTION = "AutomatedExecutionPhase";
1313
export const AUTOMATED_PUBLISHING = "PublishingAutomatedResultsPhase";
14-
export const MANUALTESTS_PUBLISHING = "ManualTestResultsPublishingPhase";
14+
export const MANUALTESTS_PUBLISHING = "ManualTestResultsPublishingPhase";

Tasks/AzureTestPlanV0/task.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"author": "Microsoft Corporation",
1414
"version": {
1515
"Major": 0,
16-
"Minor": 238,
17-
"Patch": 12
16+
"Minor": 241,
17+
"Patch": 0
1818
},
1919
"preview": true,
2020
"demands": [],
@@ -79,7 +79,8 @@
7979
"options": {
8080
"Java-Maven": "Java-Maven",
8181
"Java-Gradle": "Java-Gradle",
82-
"Python": "Python"
82+
"Python": "Python",
83+
"Go": "Go"
8384
},
8485
"properties": {
8586
"MultiSelectFlatList": "True"

Tasks/AzureTestPlanV0/task.loc.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"author": "Microsoft Corporation",
1414
"version": {
1515
"Major": 0,
16-
"Minor": 238,
17-
"Patch": 12
16+
"Minor": 241,
17+
"Patch": 0
1818
},
1919
"preview": true,
2020
"demands": [],
@@ -79,7 +79,8 @@
7979
"options": {
8080
"Java-Maven": "Java-Maven",
8181
"Java-Gradle": "Java-Gradle",
82-
"Python": "Python"
82+
"Python": "Python",
83+
"Go": "Go"
8384
},
8485
"properties": {
8586
"MultiSelectFlatList": "True"
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Default|0.238.12
2-
Node20-225|0.238.13
1+
Default|0.241.0
2+
Node20-225|0.241.1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import tl = require('azure-pipelines-task-lib/task');
2+
import utils = require('../utils');
3+
import constants = require('../constants');
4+
5+
export async function executeGoTests(testsToBeExecuted: string[]): Promise<number> {
6+
7+
//Go execution will be added
8+
/*executable = go;
9+
args = test, ./...
10+
spawn*/
11+
12+
console.log("Go changes1");
13+
return 1;
14+
}
15+

_generated/AzureTestPlanV0/automatedTestInvoker.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { executePythonTests } from './Invokers/pythoninvoker'
33
import { executeMavenTests } from './Invokers/maveninvoker'
44
import { executeGradleTests } from './Invokers/gradleinvoker'
55
import { ciDictionary } from './ciEventLogger';
6-
6+
import { executeGoTests } from './Invokers/goinvoker';
77
export async function testInvoker(testsToBeExecuted: string[], ciData: ciDictionary): Promise<number> {
88

99
const testLanguageStrings = tl.getDelimitedInput('testLanguageInput', ',', true);
@@ -37,6 +37,12 @@ export async function testInvoker(testsToBeExecuted: string[], ciData: ciDiction
3737
ciData["isPythonExecution"] = true;
3838
break;
3939

40+
case 'Go':
41+
exitCode = await executeGoTests(testsToBeExecuted);
42+
tl.debug(`Execution Status Code for Go: ${exitCode}`);
43+
ciData["isGoExecution"] = true;
44+
break;
45+
4046
default:
4147
console.log('Invalid test Language Input selected.');
4248
ciData["NoLanguageInput"] = true;

_generated/AzureTestPlanV0/constants.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ export const NOT_AUTOMATED = 'Not Automated'
1111
export const MERGE_THRESHOLD = 100;
1212
export const AUTOMATED_EXECUTION = "AutomatedExecutionPhase";
1313
export const AUTOMATED_PUBLISHING = "PublishingAutomatedResultsPhase";
14-
export const MANUALTESTS_PUBLISHING = "ManualTestResultsPublishingPhase";
14+
export const MANUALTESTS_PUBLISHING = "ManualTestResultsPublishingPhase";

_generated/AzureTestPlanV0/task.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"author": "Microsoft Corporation",
1414
"version": {
1515
"Major": 0,
16-
"Minor": 238,
17-
"Patch": 12
16+
"Minor": 241,
17+
"Patch": 0
1818
},
1919
"preview": true,
2020
"demands": [],
@@ -79,7 +79,8 @@
7979
"options": {
8080
"Java-Maven": "Java-Maven",
8181
"Java-Gradle": "Java-Gradle",
82-
"Python": "Python"
82+
"Python": "Python",
83+
"Go": "Go"
8384
},
8485
"properties": {
8586
"MultiSelectFlatList": "True"
@@ -179,7 +180,7 @@
179180
"MultipleMatchingGradlewFound": "Multiple gradlew files found. Selecting the first matched instance"
180181
},
181182
"_buildConfigMapping": {
182-
"Default": "0.238.12",
183-
"Node20-225": "0.238.13"
183+
"Default": "0.241.0",
184+
"Node20-225": "0.241.1"
184185
}
185186
}

_generated/AzureTestPlanV0/task.loc.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"author": "Microsoft Corporation",
1414
"version": {
1515
"Major": 0,
16-
"Minor": 238,
17-
"Patch": 12
16+
"Minor": 241,
17+
"Patch": 0
1818
},
1919
"preview": true,
2020
"demands": [],
@@ -79,7 +79,8 @@
7979
"options": {
8080
"Java-Maven": "Java-Maven",
8181
"Java-Gradle": "Java-Gradle",
82-
"Python": "Python"
82+
"Python": "Python",
83+
"Go": "Go"
8384
},
8485
"properties": {
8586
"MultiSelectFlatList": "True"
@@ -179,7 +180,7 @@
179180
"MultipleMatchingGradlewFound": "ms-resource:loc.messages.MultipleMatchingGradlewFound"
180181
},
181182
"_buildConfigMapping": {
182-
"Default": "0.238.12",
183-
"Node20-225": "0.238.13"
183+
"Default": "0.241.0",
184+
"Node20-225": "0.241.1"
184185
}
185186
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import tl = require('azure-pipelines-task-lib/task');
2+
import utils = require('../utils');
3+
import constants = require('../constants');
4+
5+
export async function executeGoTests(testsToBeExecuted: string[]): Promise<number> {
6+
7+
//Go execution will be added
8+
/*executable = go;
9+
args = test, ./...
10+
spawn*/
11+
12+
console.log("Go changes1");
13+
return 1;
14+
}
15+

_generated/AzureTestPlanV0_Node20/automatedTestInvoker.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { executePythonTests } from './Invokers/pythoninvoker'
33
import { executeMavenTests } from './Invokers/maveninvoker'
44
import { executeGradleTests } from './Invokers/gradleinvoker'
55
import { ciDictionary } from './ciEventLogger';
6-
6+
import { executeGoTests } from './Invokers/goinvoker';
77
export async function testInvoker(testsToBeExecuted: string[], ciData: ciDictionary): Promise<number> {
88

99
const testLanguageStrings = tl.getDelimitedInput('testLanguageInput', ',', true);
@@ -37,6 +37,12 @@ export async function testInvoker(testsToBeExecuted: string[], ciData: ciDiction
3737
ciData["isPythonExecution"] = true;
3838
break;
3939

40+
case 'Go':
41+
exitCode = await executeGoTests(testsToBeExecuted);
42+
tl.debug(`Execution Status Code for Go: ${exitCode}`);
43+
ciData["isGoExecution"] = true;
44+
break;
45+
4046
default:
4147
console.log('Invalid test Language Input selected.');
4248
ciData["NoLanguageInput"] = true;

_generated/AzureTestPlanV0_Node20/constants.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ export const NOT_AUTOMATED = 'Not Automated'
1111
export const MERGE_THRESHOLD = 100;
1212
export const AUTOMATED_EXECUTION = "AutomatedExecutionPhase";
1313
export const AUTOMATED_PUBLISHING = "PublishingAutomatedResultsPhase";
14-
export const MANUALTESTS_PUBLISHING = "ManualTestResultsPublishingPhase";
14+
export const MANUALTESTS_PUBLISHING = "ManualTestResultsPublishingPhase";

_generated/AzureTestPlanV0_Node20/task.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"author": "Microsoft Corporation",
1414
"version": {
1515
"Major": 0,
16-
"Minor": 238,
17-
"Patch": 13
16+
"Minor": 241,
17+
"Patch": 1
1818
},
1919
"preview": true,
2020
"demands": [],
@@ -79,7 +79,8 @@
7979
"options": {
8080
"Java-Maven": "Java-Maven",
8181
"Java-Gradle": "Java-Gradle",
82-
"Python": "Python"
82+
"Python": "Python",
83+
"Go": "Go"
8384
},
8485
"properties": {
8586
"MultiSelectFlatList": "True"
@@ -183,7 +184,7 @@
183184
"MultipleMatchingGradlewFound": "Multiple gradlew files found. Selecting the first matched instance"
184185
},
185186
"_buildConfigMapping": {
186-
"Default": "0.238.12",
187-
"Node20-225": "0.238.13"
187+
"Default": "0.241.0",
188+
"Node20-225": "0.241.1"
188189
}
189190
}

_generated/AzureTestPlanV0_Node20/task.loc.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"author": "Microsoft Corporation",
1414
"version": {
1515
"Major": 0,
16-
"Minor": 238,
17-
"Patch": 13
16+
"Minor": 241,
17+
"Patch": 1
1818
},
1919
"preview": true,
2020
"demands": [],
@@ -79,7 +79,8 @@
7979
"options": {
8080
"Java-Maven": "Java-Maven",
8181
"Java-Gradle": "Java-Gradle",
82-
"Python": "Python"
82+
"Python": "Python",
83+
"Go": "Go"
8384
},
8485
"properties": {
8586
"MultiSelectFlatList": "True"
@@ -183,7 +184,7 @@
183184
"MultipleMatchingGradlewFound": "ms-resource:loc.messages.MultipleMatchingGradlewFound"
184185
},
185186
"_buildConfigMapping": {
186-
"Default": "0.238.12",
187-
"Node20-225": "0.238.13"
187+
"Default": "0.241.0",
188+
"Node20-225": "0.241.1"
188189
}
189190
}

0 commit comments

Comments
 (0)