This repository has been archived by the owner on Jun 4, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add notice and annotation properties (actions/[email protected]) (#6)
* add notice and annotation properties * fix codeql * bump version
- Loading branch information
Showing
8 changed files
with
487 additions
and
105 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,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 |
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.