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:
- 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)
# License

View file

@ -17,6 +17,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
const core = __importStar(require("@actions/core"));
const installer = __importStar(require("./installer"));
const path = __importStar(require("path"));
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
@ -29,7 +30,8 @@ function run() {
yield installer.getGo(version);
}
// 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) {
core.setFailed(error.message);

View file

@ -1,5 +1,6 @@
import * as core from '@actions/core';
import * as installer from './installer';
import * as path from 'path';
async function run() {
try {
@ -13,7 +14,9 @@ async function run() {
}
// 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) {
core.setFailed(error.message);
}