You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Michael Sokolov (Jira)" <ji...@apache.org> on 2021/01/07 15:55:00 UTC
[jira] [Comment Edited] (LUCENE-9658) Make 'precommit' an alias for
gradle 'check' task.
[ https://issues.apache.org/jira/browse/LUCENE-9658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17260593#comment-17260593 ]
Michael Sokolov edited comment on LUCENE-9658 at 1/7/21, 3:54 PM:
------------------------------------------------------------------
Thanks for the pointers! I propose we should:
```
{{
--- a/.github/workflows/gradle-precommit.yml
+++ b/.github/workflows/gradle-precommit.yml
@@ -33,6 +33,6 @@ jobs:
${ runner.os }-gradle-
- name: Build with Gradle
- run: ./gradlew precommit
+ run: ./gradlew check -x test
- uses: gradle/wrapper-validation-action@v1
}}
was (Author: sokolov):
Thanks for the pointers! I propose we should:
```
10:51 $ git diff master
diff --git a/.github/workflows/gradle-precommit.yml b/.github/workflows/gradle-precommit.yml
index ff275b853b5..8a3d0c50bd5 100644
--- a/.github/workflows/gradle-precommit.yml
+++ b/.github/workflows/gradle-precommit.yml
@@ -33,6 +33,6 @@ jobs:
${\{ runner.os }}-gradle-
- name: Build with Gradle
- run: ./gradlew precommit
+ run: ./gradlew check -x test
- uses: gradle/wrapper-validation-action@v1
```
> Make 'precommit' an alias for gradle 'check' task.
> --------------------------------------------------
>
> Key: LUCENE-9658
> URL: https://issues.apache.org/jira/browse/LUCENE-9658
> Project: Lucene - Core
> Issue Type: Task
> Reporter: Dawid Weiss
> Assignee: Dawid Weiss
> Priority: Major
>
> A separate precommit task is clumsy and error prone. This was done to support back-compatibility with ant but I think it should be removed in favor of the gradle-convention 'check'.
> The only difference precommit currently has from check is that it doesn't run tests. People who want to bypass tests can still run check with:
> {code}
> ./gradlew check -x test
> {code}
> which excludes all test tasks from running.
> We can make precommit an alias to check at first ({{precommit.dependsOn check}}) and perhaps disable all tests manually so that it is compatible with the previous behavior. I'll add an info-box at the end to instruct people how to run check without tests too.
> The benefit of using check is that you can run it selectively on subprojects and that there is no need for extra plumbing to attach validation tasks to it.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org