Skip to content

Commit 5319433

Browse files
committed
Linting HelloWorld sample
1 parent 7c42779 commit 5319433

5 files changed

Lines changed: 18 additions & 63 deletions

File tree

Lines changed: 6 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Workflow to checkout repository
2-
name: Test action action-checkout
1+
# Workflow to test Action action-maven-build
2+
name: Test action action-maven-build
33

44
on:
55
push:
@@ -13,66 +13,15 @@ permissions:
1313
contents: read # for checkout
1414

1515
jobs:
16-
test-checkout-persist-credentials-default:
17-
name: test-persist-credentials-default
16+
test-action-maven-build:
17+
name: test-action-maven-build
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: checkout-local-actions
2121
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2222
with:
2323
fetch-depth: 0
2424
persist-credentials: false
25-
- uses: ./action-templates/actions/action-checkout
26-
- name: persist-credentials-default
27-
run: |
28-
for file in "$RUNNER_TEMP"/git-credentials-*.config
29-
do
30-
if [ -e "$file" ]; then
31-
echo "Detected credential file"
32-
exit 1
33-
fi
34-
done
35-
36-
test-checkout-persist-credentials-false:
37-
name: test-persist-credentials-false
38-
runs-on: ubuntu-latest
39-
steps:
40-
- name: checkout-local-actions
41-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
42-
with:
43-
fetch-depth: 0
44-
persist-credentials: false
45-
- uses: ./action-templates/actions/action-checkout
46-
with:
47-
persist-credentials: false
48-
- name: persist-credentials-false
49-
run: |
50-
for file in "$RUNNER_TEMP"/git-credentials-*.config
51-
do
52-
if [ -e "$file" ]; then
53-
echo "Detected credential file"
54-
exit 1
55-
fi
56-
done
57-
58-
test-checkout-persist-credentials-true:
59-
name: test-persist-credentials-true
60-
runs-on: ubuntu-latest
61-
steps:
62-
- name: checkout-local-actions
63-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
64-
with:
65-
fetch-depth: 0
66-
persist-credentials: false
67-
- uses: ./action-templates/actions/action-checkout
25+
- uses: ./action-templates/actions/action-maven-build
6826
with:
69-
persist-credentials: true
70-
- name: persist-credentials-true
71-
run: |
72-
for file in "$RUNNER_TEMP"/git-credentials-*.config
73-
do
74-
if [ ! -e "$file" ]; then
75-
echo "Couldn't detect credential file"
76-
exit 1
77-
fi
78-
done
27+
app-path: __tests__/maven-helloworld

__tests__/maven-helloworld/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<artifactId>helloworld</artifactId>
99
<version>1.0-SNAPSHOT</version>
1010
<packaging>jar</packaging>
11-
<name>Hello World App</name>
11+
<name>HelloWorld</name>
1212

1313
</project>

__tests__/maven-helloworld/src/main/de/muenchen/helloworld/HelloWorldApp.java

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package de.muenchen.helloworld;
2+
3+
final public class HelloWorld {
4+
private HelloWorld() {
5+
// Prevent instantiation
6+
}
7+
8+
public static void main(final String[] args) {
9+
System.out.println("Hello, World!");
10+
}
11+
}

__tests__/maven-helloworld/src/main/java/package-info.java

Whitespace-only changes.

0 commit comments

Comments
 (0)