Skip to content

Commit 6d52353

Browse files
committed
Merge branch 'add-ci' into add-publish
2 parents b4715ea + c5b65b5 commit 6d52353

File tree

6 files changed

+52
-1
lines changed

6 files changed

+52
-1
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gradle
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: weekly

.github/workflows/check.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Check
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
build:
11+
runs-on: windows-latest
12+
13+
steps:
14+
- uses: actions/checkout@v6
15+
16+
- name: Set up JDK
17+
uses: actions/setup-java@v5
18+
with:
19+
java-version: '11'
20+
distribution: 'temurin'
21+
22+
- name: Run checks with Gradle
23+
run: ./gradlew check

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
bin/
22
build/
33
*.pdf
4-
.*
4+
5+
.gradle
6+
.idea/
7+
.vscode/

gradlew

100644100755
File mode changed.

test/mslinks/ReadTests.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515
package mslinks;
1616

17+
import org.junit.Assume;
1718
import org.junit.Test;
1819

1920
import io.ByteReader;
@@ -56,6 +57,9 @@ public void TestLinkProperties() throws IOException, ShellLinkException {
5657

5758
@Test
5859
public void TestLinkHeaderProperties() throws IOException, ShellLinkException {
60+
// skip on CI, because time zone offsets cause issues
61+
Assume.assumeTrue(System.getenv("CI") == null);
62+
5963
var link = createLink(ReadTestData.consolelink);
6064
var header = link.getHeader();
6165

test/mslinks/WriteTests.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
import java.io.ByteArrayOutputStream;
2020
import java.io.IOException;
2121

22+
import org.junit.Assume;
23+
import org.junit.BeforeClass;
24+
import org.junit.Ignore;
2225
import org.junit.Test;
2326

2427
import io.ByteWriter;
@@ -35,6 +38,14 @@ public class WriteTests {
3538
private static final String PROJECT_DIR = "Programming\\Java\\mslinks";
3639
private static final String RELATIVE_PATH = "..\\..";
3740

41+
/**
42+
* Disable tests on CI, because we cannot guarantee the checkout at C:\Programming\Java\mslinks
43+
*/
44+
@BeforeClass
45+
public static void skipOnCi() {
46+
Assume.assumeTrue(System.getenv("CI") == null);
47+
}
48+
3849
private ShellLinkHelper createLink() {
3950
var link = new ShellLink();
4051
var header = link.getHeader();

0 commit comments

Comments
 (0)