Skip to content

Commit 7c6bd77

Browse files
Merge pull request TweetyProjectTeam#19 from odzhychko/ci/run-tests
Run tests in CI
2 parents 8703063 + 8c9d008 commit 7c6bd77

File tree

3 files changed

+36
-12
lines changed

3 files changed

+36
-12
lines changed

.github/workflows/package.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Package
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Set up JDK 21
17+
uses: actions/setup-java@v4
18+
with:
19+
# Compile source and target are still specified in pom.xml
20+
java-version: '21'
21+
distribution: 'temurin'
22+
cache: maven
23+
- name: Build with Maven
24+
run: mvn --batch-mode package
25+
26+
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
27+
- name: Update dependency graph
28+
uses: advanced-security/maven-dependency-submission-action@v4

org-tweetyproject-arg-setaf/src/test/java/SetAfTheoryTest.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@
1717
* Copyright 2021 The TweetyProject Team <http://tweetyproject.org/contact/>
1818
*/
1919

20-
21-
22-
23-
import static org.junit.jupiter.api.Assertions.assertTrue;
20+
import static org.junit.jupiter.api.Assertions.assertEquals;
2421

2522
import java.util.HashSet;
2623
import java.util.Set;
@@ -36,6 +33,7 @@
3633
* Examples of SetAf Theorys and their semantics
3734
*
3835
* @author Sebastian Franke
36+
* @author Oleksandr Dzhychko
3937
*
4038
*/
4139
public class SetAfTheoryTest {
@@ -69,12 +67,10 @@ public void extensionTest() {
6967
String grS = gr.getModel(s).toString();
7068
String adS = ad.getModels(s).toString();
7169
String prS = pr.getModels(s).toString();
72-
73-
assertTrue(grS.equals("{b,d}"));
74-
assertTrue(adS.equals("[{b}, {d}, {b,d}, {}]"));
75-
assertTrue(prS.equals("[{b,d}]"));
76-
7770

71+
assertEquals("{b,c,d}", grS);
72+
assertEquals("[{b}, {d}, {b,d}, {b,c,d}, {}]", adS);
73+
assertEquals("[{b,c,d}]", prS);
7874
}
7975

8076
}

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
</execution>
108108
</executions>
109109
<configuration>
110-
<outputDirectory>../testBuild</outputDirectory>
110+
<outputDirectory>./testBuild</outputDirectory>
111111
<finalName
112112
>${project.groupId}.${project.artifactId}-${project.version}</finalName>
113113
</configuration>
@@ -125,7 +125,7 @@
125125
</execution>
126126
</executions>
127127
<configuration>
128-
<outputDirectory>../testBuild</outputDirectory>
128+
<outputDirectory>./testBuild</outputDirectory>
129129
<finalName
130130
>${project.groupId}.${project.artifactId}-${project.version}</finalName>
131131
</configuration>
@@ -137,7 +137,7 @@
137137
<configuration>
138138
<finalName
139139
>${project.groupId}.${project.artifactId}-${project.version}</finalName>
140-
<outputDirectory>../testBuild</outputDirectory>
140+
<outputDirectory>./testBuild</outputDirectory>
141141
</configuration>
142142
</plugin>
143143
<!--

0 commit comments

Comments
 (0)