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

Commit 55350c1

Browse files
authored
Add notice and annotation properties (actions/core@1.5.0) (#6)
* add notice and annotation properties * fix codeql * bump version
1 parent f4620ad commit 55350c1

File tree

8 files changed

+487
-105
lines changed

8 files changed

+487
-105
lines changed

.github/workflows/codeql.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/java_ci.yml

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
name: Java CI
2+
on:
3+
push: {}
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
build:
9+
name: Compile (Java ${{ matrix.jdk }})
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
jdk: [8, 9, 11, 16]
14+
fail-fast: false
15+
steps:
16+
- name: 📤 Checkout Repository
17+
uses: actions/checkout@v2.3.4
18+
19+
- name: 📚 Install OpenJDK
20+
uses: AdoptOpenJDK/install-jdk@v1.1.1
21+
with:
22+
version: ${{ matrix.jdk }}
23+
architecture: x64
24+
25+
- name: 📤 Load Cache
26+
uses: actions/cache@v2.1.6
27+
with:
28+
path: ~/.m2/repository
29+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
30+
restore-keys: |
31+
${{ runner.os }}-maven-
32+
33+
- name: ✔ Compile with Maven
34+
run: mvn compile -DskipTests --no-transfer-progress
35+
36+
codeql:
37+
name: CodeQL (Java ${{ matrix.jdk }})
38+
runs-on: ubuntu-latest
39+
needs: build
40+
strategy:
41+
matrix:
42+
jdk: [11]
43+
fail-fast: false
44+
steps:
45+
- name: 📤 Checkout Repository
46+
uses: actions/checkout@v2.3.4
47+
48+
- name: 📚 Install CodeQL
49+
uses: github/codeql-action/init@v1
50+
with:
51+
languages: java
52+
53+
- name: 📚 Install OpenJDK
54+
uses: AdoptOpenJDK/install-jdk@v1.1.1
55+
with:
56+
version: ${{ matrix.jdk }}
57+
architecture: x64
58+
59+
- name: 📤 Load Cache
60+
uses: actions/cache@v2.1.6
61+
with:
62+
path: ~/.m2/repository
63+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
64+
restore-keys: |
65+
${{ runner.os }}-maven-
66+
67+
- name: ✔ Compile with Maven
68+
run: mvn compile -DskipTests --no-transfer-progress
69+
70+
- name: ✔ Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v1
72+
73+
test:
74+
name: Test (Java ${{ matrix.jdk }})
75+
runs-on: ubuntu-latest
76+
needs: codeql
77+
strategy:
78+
matrix:
79+
jdk: [8, 9, 11, 16]
80+
fail-fast: false
81+
env:
82+
INPUT_INPUT: 'val'
83+
INPUT_SPECIAL_CHARS: "' \"\\ response "
84+
INPUT_MULTIPLE_SPACE_VARIABLE: 'I have multiple spaces'
85+
INPUT_MULTIPLE_LINES: |
86+
val1
87+
val2
88+
val3
89+
INPUT_WHITESPACE: ' some val '
90+
INPUT_BOOLEAN: 'true'
91+
INPUT_TRUE1: 'true'
92+
INPUT_TRUE2: 'True'
93+
INPUT_TRUE3: 'TRUE'
94+
INPUT_FALSE1: 'false'
95+
INPUT_FALSE2: 'False'
96+
INPUT_FALSE3: 'FALSE'
97+
INPUT_WRONG: 'wrong'
98+
STATE_TEST_1: 'state_val'
99+
100+
steps:
101+
- name: 📦 Prepare Git Repo
102+
uses: actions/checkout@v2.3.4
103+
104+
- name: ☕ Install OpenJDK
105+
uses: AdoptOpenJDK/install-jdk@v1.1.1
106+
with:
107+
version: ${{ matrix.jdk }}
108+
architecture: x64
109+
110+
- name: 📤 Load Cache
111+
uses: actions/cache@v2.1.6
112+
with:
113+
path: ~/.m2/repository
114+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
115+
restore-keys: |
116+
${{ runner.os }}-maven-
117+
118+
- id: mvn
119+
name: ✔ Test with Maven
120+
run: mvn test -fae --no-transfer-progress
121+
122+
- name: ✔ Test Output
123+
if: steps.mvn.outputs['some output'] != '1.01' && steps.mvn.outputs['some output'] != 'false' && steps.mvn.outputs['some output'] != 'some value'
124+
run: |
125+
echo "::set-failed::Output is missing"
126+
exit 1

.github/workflows/javaci.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
</div>
99

1010
<div align="center">
11-
<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>
12-
<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>
11+
<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>
1312
<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>
1413
<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>
1514
<a href="https://github.com/KatsuteDev/JCore/releases"><img alt="version" src="https://img.shields.io/github/v/release/KatsuteDev/JCore"></a>
@@ -27,9 +26,20 @@ jCore supports most GitHub workflow commands.
2726
```java
2827
Workflow.info("info");
2928
Workflow.debug("debug");
29+
Workflow.notice("notice");
3030
Workflow.warning("warning");
3131
Workflow.error("error");
3232
```
33+
- AnnotationProperties
34+
```java
35+
new AnnotationProperties.Builder()
36+
.title("A title")
37+
.startColumn(1)
38+
.endColumn(2)
39+
.startLine(3)
40+
.endLine(4)
41+
.build()
42+
```
3343
- Groups
3444
```java
3545
Workflow.startGroup("my-group");

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>dev.katsute</groupId>
88
<artifactId>jcore</artifactId>
9-
<version>1.0.0</version>
9+
<version>1.1.0</version>
1010

1111
<profiles>
1212
<profile>

0 commit comments

Comments
 (0)