-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ed4baaa
Showing
17 changed files
with
553 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Check out all text files in UNIX format, with LF as end of line | ||
# Don't change this file. If you have any ideas about it, please | ||
# submit a separate issue about it and we'll discuss. | ||
|
||
* text=auto eol=lf | ||
*.java ident | ||
*.xml ident | ||
*.png binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
name: codecov | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
codecov: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 11 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
maven- | ||
- run: mvn install -Pjacoco | ||
- uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./target/site/jacoco/jacoco.xml | ||
fail_ci_if_error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
name: mvn | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
mvn: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04, macos-12, windows-2022] | ||
java: [11, 17] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: ${{ matrix.java }} | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-jdk-${{ matrix.java }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-jdk-${{ matrix.java }}-maven- | ||
- run: java -version | ||
- run: mvn -version | ||
- run: mvn --errors --batch-mode clean install -Pqulice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
name: pdd | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
pdd: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: volodya-lombrozo/pdd-action@master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
name: up | ||
on: | ||
push: | ||
jobs: | ||
up: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: |- | ||
git fetch --tags --force && \ | ||
latest=$(git tag --sort=creatordate | tail -1) && \ | ||
sed -E -i "s/<version>[^<]+/<version>${latest}/g" README.md | ||
- uses: peter-evans/create-pull-request@v5 | ||
with: | ||
commit-message: 'new version in README' | ||
delete-branch: true | ||
title: 'New version in README' | ||
assignees: yegor256 | ||
branch: up | ||
base: master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
name: xcop | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
xcop: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: g4s8/xcop-action@master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
target/ | ||
.idea | ||
.DS_Store | ||
*.iml | ||
.project | ||
.settings | ||
.classpath | ||
.recommenders | ||
.mvn/wrapper/maven-wrapper.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
docker: | ||
image: yegor256/rultor-image:1.22.0 | ||
assets: | ||
settings.xml: yegor256/home#assets/jping/settings.xml | ||
pubring.gpg: yegor256/home#assets/pubring.gpg | ||
secring.gpg: yegor256/home#assets/secring.gpg | ||
install: | | ||
pdd --file=/dev/null | ||
merge: | ||
script: | | ||
mvn clean install -Pqulice --errors -Dstyle.color=never | ||
release: | ||
script: |- | ||
[[ "${tag}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || exit -1 | ||
mvn versions:set "-DnewVersion=${tag}" -Dstyle.color=never | ||
git commit -am "${tag}" | ||
mvn clean install -Dinvoker.skip | ||
mvn clean deploy -Pjping -Psonatype --errors --settings ../settings.xml -Dstyle.color=never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2023 Yegor Bugayenko | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included | ||
in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org) | ||
[![DevOps By Rultor.com](http://www.rultor.com/b/yegor256/jping)](http://www.rultor.com/p/yegor256/jping) | ||
[![We recommend IntelliJ IDEA](https://www.elegantobjects.org/intellij-idea.svg)](https://www.jetbrains.com/idea/) | ||
|
||
[![mvn](https://github.com/yegor256/jping/actions/workflows/mvn.yml/badge.svg)](https://github.com/yegor256/jping/actions/workflows/mvn.yml) | ||
[![PDD status](http://www.0pdd.com/svg?name=yegor256/jping)](http://www.0pdd.com/p?name=yegor256/jping) | ||
[![Maven Central](https://img.shields.io/maven-central/v/com.yegor256/jping.svg)](https://maven-badges.herokuapp.com/maven-central/com.yegor256/jping) | ||
[![Javadoc](http://www.javadoc.io/badge/com.yegor256/jping.svg)](http://www.javadoc.io/doc/com.yegor256/jping) | ||
[![codecov](https://codecov.io/gh/yegor256/jping/branch/master/graph/badge.svg)](https://codecov.io/gh/yegor256/jping) | ||
[![Hits-of-Code](https://hitsofcode.com/github/yegor256/jping)](https://hitsofcode.com/view/github/yegor256/jping) | ||
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/jping/blob/master/LICENSE.txt) | ||
|
||
JUnit5 execution condition that checks whether a connection to public Internet is available. | ||
|
||
First, you add this to your `pom.xml`: | ||
|
||
```xml | ||
<dependency> | ||
<groupId>com.yegor256</groupId> | ||
<artifactId>jping</artifactId> | ||
<version>0.0.0</version> | ||
</dependency> | ||
``` | ||
|
||
Then, you use it like this: | ||
|
||
```java | ||
import com.yegor256.WeAreOnline; | ||
|
||
@ExtendWith(WeAreOnline.class) | ||
final class MyTest { | ||
// Your test methods | ||
} | ||
``` | ||
|
||
|
||
## How to Contribute | ||
|
||
Fork repository, make changes, send us a [pull request](https://www.yegor256.com/2014/04/15/github-guidelines.html). | ||
We will review your changes and apply them to the `master` branch shortly, | ||
provided they don't violate our quality standards. To avoid frustration, | ||
before sending us your pull request please run full Maven build: | ||
|
||
```bash | ||
$ mvn clean install -Pqulice | ||
``` | ||
|
||
You will need Maven 3.3+ and Java 8+. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
The MIT License (MIT) | ||
Copyright (c) 2023 Yegor Bugayenko | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included | ||
in all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.jcabi</groupId> | ||
<artifactId>parent</artifactId> | ||
<version>0.66.0</version> | ||
</parent> | ||
<groupId>com.yegor256</groupId> | ||
<artifactId>jping</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
<name>jping</name> | ||
<description>JUnit execution condition to check that we are online</description> | ||
<url>https://github.com/yegor256/jping</url> | ||
<inceptionYear>2023</inceptionYear> | ||
<organization> | ||
<name>yegor256</name> | ||
<url>https://www.yegor256.com</url> | ||
</organization> | ||
<licenses> | ||
<license> | ||
<name>MIT</name> | ||
<url>https://raw.githubusercontent.com/yegor256/jping/master/LICENSE.txt</url> | ||
<distribution>site</distribution> | ||
</license> | ||
</licenses> | ||
<repositories> | ||
<repository> | ||
<id>boom</id> | ||
<url>file:///tmp/boom</url> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
</repository> | ||
</repositories> | ||
<developers> | ||
<developer> | ||
<id>1</id> | ||
<name>Yegor Bugayenko</name> | ||
<email>[email protected]</email> | ||
<organization>yegor256.com</organization> | ||
<organizationUrl>https://www.yegor256.com</organizationUrl> | ||
<roles> | ||
<role>Architect</role> | ||
<role>Developer</role> | ||
</roles> | ||
<timezone>+3</timezone> | ||
</developer> | ||
</developers> | ||
<issueManagement> | ||
<system>GitHub</system> | ||
<url>https://github.com/yegor256/jping/issues</url> | ||
</issueManagement> | ||
<scm> | ||
<connection>scm:git:[email protected]:yegor256/jping.git</connection> | ||
<developerConnection>scm:git:[email protected]:yegor256/jping.git</developerConnection> | ||
<url>https://github.com/yegor256/jping</url> | ||
</scm> | ||
<ciManagement> | ||
<system>rultor</system> | ||
<url>https://www.rultor.com/s/yegor256/jping</url> | ||
</ciManagement> | ||
<distributionManagement> | ||
<site> | ||
<id>github-pages</id> | ||
<url>https://github.com/yegor256/jping</url> | ||
</site> | ||
</distributionManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-api</artifactId> | ||
<version>5.9.3</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hamcrest</groupId> | ||
<artifactId>hamcrest</artifactId> | ||
<version>2.2</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-engine</artifactId> | ||
<version>5.9.3</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
<profiles> | ||
<profile> | ||
<id>qulice</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>com.qulice</groupId> | ||
<artifactId>qulice-maven-plugin</artifactId> | ||
<version>0.22.0</version> | ||
<configuration> | ||
<excludes combine.children="append"> | ||
<exclude>duplicatefinder:.*</exclude> | ||
</excludes> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"config:base" | ||
] | ||
} |
Oops, something went wrong.