mirror of
https://github.com/actions/setup-python.git
synced 2024-11-29 04:15:25 +01:00
Add matcher
This commit is contained in:
parent
87886b89ec
commit
f7f8dbaddf
3 changed files with 22 additions and 0 deletions
16
.github/python.json
vendored
Normal file
16
.github/python.json
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"problemMatcher": [
|
||||||
|
{
|
||||||
|
"owner": "python",
|
||||||
|
"pattern": [
|
||||||
|
{
|
||||||
|
"regexp": "^\\s*File\\s\\\"(.*)\\\",\\sline\\s(\\d+),\\sin\\s(.*)\\s*raise\\s(.*)\\(\\'(.*)\\'\\)\\s*(.*)\\:\\s.*$",
|
||||||
|
"file": 1,
|
||||||
|
"line": 2,
|
||||||
|
"severity": 4,
|
||||||
|
"message": 5
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -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 finder = __importStar(require("./find-python"));
|
const finder = __importStar(require("./find-python"));
|
||||||
|
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 {
|
||||||
|
@ -25,6 +26,8 @@ function run() {
|
||||||
const arch = core.getInput('architecture', { required: true });
|
const arch = core.getInput('architecture', { required: true });
|
||||||
yield finder.findPythonVersion(version, arch);
|
yield finder.findPythonVersion(version, arch);
|
||||||
}
|
}
|
||||||
|
const matchersPath = path.join(__dirname, '..', '.github');
|
||||||
|
console.log(`##[add-matcher]${path.join(matchersPath, 'python.json')}`);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
core.setFailed(err.message);
|
core.setFailed(err.message);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as finder from './find-python';
|
import * as finder from './find-python';
|
||||||
|
import * as path from 'path';
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
try {
|
try {
|
||||||
|
@ -8,6 +9,8 @@ async function run() {
|
||||||
const arch: string = core.getInput('architecture', {required: true});
|
const arch: string = core.getInput('architecture', {required: true});
|
||||||
await finder.findPythonVersion(version, arch);
|
await finder.findPythonVersion(version, arch);
|
||||||
}
|
}
|
||||||
|
const matchersPath = path.join(__dirname, '..', '.github');
|
||||||
|
console.log(`##[add-matcher]${path.join(matchersPath, 'python.json')}`);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
core.setFailed(err.message);
|
core.setFailed(err.message);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue