Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Commit

Permalink
Add notice and annotation properties (actions/[email protected]) (#6)
Browse files Browse the repository at this point in the history
* add notice and annotation properties

* fix codeql

* bump version
  • Loading branch information
Katsute authored Aug 21, 2021
1 parent f4620ad commit 55350c1
Show file tree
Hide file tree
Showing 8 changed files with 487 additions and 105 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/codeql.yml

This file was deleted.

126 changes: 126 additions & 0 deletions .github/workflows/java_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: Java CI
on:
push: {}
pull_request:
branches: [main]

jobs:
build:
name: Compile (Java ${{ matrix.jdk }})
runs-on: ubuntu-latest
strategy:
matrix:
jdk: [8, 9, 11, 16]
fail-fast: false
steps:
- name: 📤 Checkout Repository
uses: actions/[email protected]

- name: 📚 Install OpenJDK
uses: AdoptOpenJDK/[email protected]
with:
version: ${{ matrix.jdk }}
architecture: x64

- name: 📤 Load Cache
uses: actions/[email protected]
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: ✔ Compile with Maven
run: mvn compile -DskipTests --no-transfer-progress

codeql:
name: CodeQL (Java ${{ matrix.jdk }})
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
jdk: [11]
fail-fast: false
steps:
- name: 📤 Checkout Repository
uses: actions/[email protected]

- name: 📚 Install CodeQL
uses: github/codeql-action/init@v1
with:
languages: java

- name: 📚 Install OpenJDK
uses: AdoptOpenJDK/[email protected]
with:
version: ${{ matrix.jdk }}
architecture: x64

- name: 📤 Load Cache
uses: actions/[email protected]
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: ✔ Compile with Maven
run: mvn compile -DskipTests --no-transfer-progress

- name: ✔ Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

test:
name: Test (Java ${{ matrix.jdk }})
runs-on: ubuntu-latest
needs: codeql
strategy:
matrix:
jdk: [8, 9, 11, 16]
fail-fast: false
env:
INPUT_INPUT: 'val'
INPUT_SPECIAL_CHARS: "' \"\\ response "
INPUT_MULTIPLE_SPACE_VARIABLE: 'I have multiple spaces'
INPUT_MULTIPLE_LINES: |
val1
val2
val3
INPUT_WHITESPACE: ' some val '
INPUT_BOOLEAN: 'true'
INPUT_TRUE1: 'true'
INPUT_TRUE2: 'True'
INPUT_TRUE3: 'TRUE'
INPUT_FALSE1: 'false'
INPUT_FALSE2: 'False'
INPUT_FALSE3: 'FALSE'
INPUT_WRONG: 'wrong'
STATE_TEST_1: 'state_val'

steps:
- name: 📦 Prepare Git Repo
uses: actions/[email protected]

- name: ☕ Install OpenJDK
uses: AdoptOpenJDK/[email protected]
with:
version: ${{ matrix.jdk }}
architecture: x64

- name: 📤 Load Cache
uses: actions/[email protected]
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- id: mvn
name: ✔ Test with Maven
run: mvn test -fae --no-transfer-progress

- name: ✔ Test Output
if: steps.mvn.outputs['some output'] != '1.01' && steps.mvn.outputs['some output'] != 'false' && steps.mvn.outputs['some output'] != 'some value'
run: |
echo "::set-failed::Output is missing"
exit 1
61 changes: 0 additions & 61 deletions .github/workflows/javaci.yml

This file was deleted.

14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
</div>

<div align="center">
<a href="https://github.com/KatsuteDev/JCore/actions/workflows/java_ci.yml"><img alt="Java CI" src="https://github.com/KatsuteDev/JCore/workflows/Java%20CI/badge.svg"></a>
<a href="https://github.com/KatsuteDev/JCore/actions/workflows/codeql.yml"><img alt="CodeQL" src="https://github.com/KatsuteDev/JCore/actions/workflows/codeql.yml/badge.svg"></a>
<a href="https://github.com/KatsuteDev/JCore/actions/workflows/java_ci.yml"><img alt="Java CI" src="https://github.com/KatsuteDev/JCore/actions/workflows/java_ci.yml/badge.svg"></a>
<a href="https://github.com/KatsuteDev/JCore/actions/workflows/release.yml"><img alt="Deploy" src="https://github.com/KatsuteDev/JCore/actions/workflows/release.yml/badge.svg"></a>
<a href="https://mvnrepository.com/artifact/dev.katsute/jcore"><img alt="Maven Central" src="https://img.shields.io/maven-central/v/dev.katsute/jcore"></a>
<a href="https://github.com/KatsuteDev/JCore/releases"><img alt="version" src="https://img.shields.io/github/v/release/KatsuteDev/JCore"></a>
Expand All @@ -27,9 +26,20 @@ jCore supports most GitHub workflow commands.
```java
Workflow.info("info");
Workflow.debug("debug");
Workflow.notice("notice");
Workflow.warning("warning");
Workflow.error("error");
```
- AnnotationProperties
```java
new AnnotationProperties.Builder()
.title("A title")
.startColumn(1)
.endColumn(2)
.startLine(3)
.endLine(4)
.build()
```
- Groups
```java
Workflow.startGroup("my-group");
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>dev.katsute</groupId>
<artifactId>jcore</artifactId>
<version>1.0.0</version>
<version>1.1.0</version>

<profiles>
<profile>
Expand Down
Loading

0 comments on commit 55350c1

Please sign in to comment.