From patchwork Wed Apr 8 04:05:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= X-Patchwork-Id: 11479303 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EE0D21392 for ; Wed, 8 Apr 2020 04:06:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CC8FF20747 for ; Wed, 8 Apr 2020 04:06:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Pa2GgXNp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726575AbgDHEGU (ORCPT ); Wed, 8 Apr 2020 00:06:20 -0400 Received: from mail-pj1-f48.google.com ([209.85.216.48]:34494 "EHLO mail-pj1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726559AbgDHEGR (ORCPT ); Wed, 8 Apr 2020 00:06:17 -0400 Received: by mail-pj1-f48.google.com with SMTP id q16so1772657pje.1 for ; Tue, 07 Apr 2020 21:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2s8YeHubB8Som9HdzP1bglEbIaOh+D+1TDY/7CiVOUI=; b=Pa2GgXNpOQAwDKiJh7+wFPqW0QuSA5BdfP2JUOd6IOb9hsZQQ8+Q8URdoznIZRh6dE GSE7CNj8fvQpCPrvA8VgFgUeAgSQXfciX5Q0lb5Jg302Uap+k9CIon7QJ9+dNXZO56Hh Ysm/s6Ir2t9aCIfyP6GOW8VKxQqVYQvn9qEoYaumHJ1IsS1Mn63L9vFdyj0vGkZUmFIX ZB3z5JqoMqi5ZuWeGpUdNUY1dbGlyGHgxg6I1afuX8s6vMx6ETGeTILancjMfnNV+NDu QSzc7BdXwFxEcsfuVeOFxrNBH+erT05gB9nlvIKLkL/cBm3+hMqXWaVm6du1Os2NWyja fE7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2s8YeHubB8Som9HdzP1bglEbIaOh+D+1TDY/7CiVOUI=; b=cP1xeNxBwMyz+N5WSkF7sAM6/0R7++/6ZBDXfWJ88WP/fyV4GISY3UG1ckswIc7lDX LVb7acq4H/fZyrQT0MYlganWAelc/ao90mG5YfZLcZTsWd1vjq6jm+v7Qo5JMfhcB8CW KO7VOzHrIgiGSKyQndnfprUVALQZ5JH7GoP8yvu257jjS3D1vTi+LggfMdYWb9CwsGZX Gax4r2kp5fr6cvoSlMlPJ3bVCWaass8Ubzd5Vge5MiI1ZMcZ+0ng2GqbFBkrbAUZNkjl xdbFike3tYf1qA481qwfMT99WzbrFe/maLSmyxwLAUb0sF78m4m3Cc8ifBq15jJ6Ty1v uzZQ== X-Gm-Message-State: AGi0PuY6BY4MgkphJv0g0Mepbtr3XpQggfrXwGJu8lkZ4AMbmZRzhKpZ sbDKIQNNL981m5fekbucuPVKm2FtCl8= X-Google-Smtp-Source: APiQypJmg7AL7OkitRDDsqUmBjjasPBD42wd55wqsgcfXsXJpMI2WDLGVl6tvhaYqzfoFnEe8uy1bg== X-Received: by 2002:a17:90a:be0b:: with SMTP id a11mr3084521pjs.56.1586318776460; Tue, 07 Apr 2020 21:06:16 -0700 (PDT) Received: from localhost.localdomain ([2402:800:6375:207b:be21:746a:7a56:9d4d]) by smtp.gmail.com with ESMTPSA id s9sm2879725pjr.5.2020.04.07.21.06.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Apr 2020 21:06:16 -0700 (PDT) From: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= To: git@vger.kernel.org Cc: Johannes Schindelin , =?utf-8?b?xJBvw6BuIFRy?= =?utf-8?b?4bqnbiBDw7RuZyBEYW5o?= Subject: [PATCH v4 11/12] ci: add a problem matcher for GitHub Actions Date: Wed, 8 Apr 2020 11:05:42 +0700 Message-Id: <715d1f732fd9ee475dd18d28f1b0801abe223d8c.1586309211.git.congdanhqx@gmail.com> X-Mailer: git-send-email 2.26.0.334.g6536db25bb In-Reply-To: References: MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin With this patch, test failures will be annotated with a helpful, clickable message in GitHub Actions. For details, see https://github.com/actions/toolkit/blob/master/docs/problem-matchers.md Note: we need to set `TEST_SHELL_PATH` to Bash so that the problem matcher is fed a file and line number for each test failure. Signed-off-by: Johannes Schindelin Signed-off-by: Đoàn Trần Công Danh --- ci/git-problem-matcher.json | 16 ++++++++++++++++ ci/lib.sh | 5 +++++ 2 files changed, 21 insertions(+) create mode 100644 ci/git-problem-matcher.json diff --git a/ci/git-problem-matcher.json b/ci/git-problem-matcher.json new file mode 100644 index 0000000000..506dfbd97f --- /dev/null +++ b/ci/git-problem-matcher.json @@ -0,0 +1,16 @@ +{ + "problemMatcher": [ + { + "owner": "git-test-suite", + "pattern": [ + { + "regexp": "^([^ :]+\\.sh):(\\d+): (error|warning|info):\\s+(.*)$", + "file": 1, + "line": 2, + "severity": 3, + "message": 4 + } + ] + } + ] +} diff --git a/ci/lib.sh b/ci/lib.sh index 8b39624f3c..4c54540fa8 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -157,6 +157,11 @@ then MAKEFLAGS="$MAKEFLAGS --jobs=10" test windows != "$CI_OS_NAME" || GIT_TEST_OPTS="--no-chain-lint --no-bin-wrappers $GIT_TEST_OPTS" + + # https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers + echo "::add-matcher::ci/git-problem-matcher.json" + test linux-musl = "$jobname" || + MAKEFLAGS="$MAKEFLAGS TEST_SHELL_PATH=/bin/sh" else echo "Could not identify CI type" >&2 env >&2