1
0
Fork 0
mirror of https://github.com/actions/setup-go synced 2024-12-22 14:22:41 +00:00

Merge pull request #2 from actions/features/matcher

Add problem matcher
This commit is contained in:
Danny McCormick 2019-06-27 18:16:45 -04:00 committed by GitHub
commit 61f2387086
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 3 deletions

16
.github/go.json vendored Normal file
View file

@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "go",
"pattern": [
{
"regexp": "^([^:]*: )?((.:)?[^:]*):(\\d+)(:(\\d+))?: (.*)$",
"file": 2,
"line": 4,
"column": 6,
"message": 7
}
]
}
]
}

View file

@ -3,7 +3,7 @@
This action sets by Go environment for use in actions by: This action sets by Go environment for use in actions by:
- optionally downloading and caching a version of Go - optionally downloading and caching a version of Go
- TODO: registering problem matchers for error output - registering problem matchers for error output
- TODO: configuring proxy if the runner is configured to use a proxy (coming with private runners) - TODO: configuring proxy if the runner is configured to use a proxy (coming with private runners)
# License # License

View file

@ -17,6 +17,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const core = __importStar(require("@actions/core")); const core = __importStar(require("@actions/core"));
const installer = __importStar(require("./installer")); const installer = __importStar(require("./installer"));
const path = __importStar(require("path"));
function run() { function run() {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
try { try {
@ -29,7 +30,8 @@ function run() {
yield installer.getGo(version); yield installer.getGo(version);
} }
// TODO: setup proxy from runner proxy config // TODO: setup proxy from runner proxy config
// TODO: problem matchers registered const matchersPath = path.join(__dirname, '..', '.github');
console.log(`##[add-matcher]${path.join(matchersPath, 'go.json')}`);
} }
catch (error) { catch (error) {
core.setFailed(error.message); core.setFailed(error.message);

View file

@ -1,5 +1,6 @@
import * as core from '@actions/core'; import * as core from '@actions/core';
import * as installer from './installer'; import * as installer from './installer';
import * as path from 'path';
async function run() { async function run() {
try { try {
@ -13,7 +14,9 @@ async function run() {
} }
// TODO: setup proxy from runner proxy config // TODO: setup proxy from runner proxy config
// TODO: problem matchers registered
const matchersPath = path.join(__dirname, '..', '.github');
console.log(`##[add-matcher]${path.join(matchersPath, 'go.json')}`);
} catch (error) { } catch (error) {
core.setFailed(error.message); core.setFailed(error.message);
} }