File tree Expand file tree Collapse file tree
src/test/java/org/codejive/miniterm
src/test/java/org/codejive/miniterm Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 cache : maven
2626
2727 - name : Build and verify
28- run : ./mvnw --no-transfer-progress --batch-mode verify
28+ run : ./mvnw --no-transfer-progress --batch-mode verify -DskipITs
Original file line number Diff line number Diff line change 1+ name : Test CI
2+
3+ on :
4+ workflow_dispatch :
5+
6+ jobs :
7+ build :
8+ runs-on : ${{ matrix.os }}
9+ strategy :
10+ matrix :
11+ os : [ubuntu-latest, windows-latest, macos-latest]
12+
13+ steps :
14+ - uses : actions/checkout@v6
15+
16+ - name : Set up JDK 22
17+ uses : actions/setup-java@v5
18+ with :
19+ java-version : ' 22'
20+ distribution : ' temurin'
21+ cache : maven
22+
23+ - name : Build and verify (no IT tests)
24+ run : ./mvnw --no-transfer-progress --batch-mode verify -DskipITs
25+
26+ - name : Build and verify (IT tests only)
27+ shell : bash
28+ run : |
29+ MVN="./mvnw --no-transfer-progress --batch-mode verify -DskipTests"
30+ if [[ "$RUNNER_OS" == "Linux" ]]; then
31+ # Allocate a PTY so /dev/tty is available for the Terminal IT tests
32+ script -q -e -c "$MVN" /dev/null
33+ elif [[ "$RUNNER_OS" == "macOS" ]]; then
34+ # BSD script: command args follow the output file
35+ script -q /dev/null $MVN
36+ else
37+ $MVN
38+ fi
Original file line number Diff line number Diff line change 107107 <argLine >--enable-native-access=ALL-UNNAMED</argLine >
108108 </configuration >
109109 </plugin >
110+ <plugin >
111+ <groupId >org.apache.maven.plugins</groupId >
112+ <artifactId >maven-failsafe-plugin</artifactId >
113+ <configuration >
114+ <argLine >--enable-native-access=ALL-UNNAMED</argLine >
115+ </configuration >
116+ <executions >
117+ <execution >
118+ <goals >
119+ <goal >integration-test</goal >
120+ <goal >verify</goal >
121+ </goals >
122+ </execution >
123+ </executions >
124+ </plugin >
110125 <plugin >
111126 <groupId >com.diffplug.spotless</groupId >
112127 <artifactId >spotless-maven-plugin</artifactId >
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright TamboUI and miniterm Contributors
3+ * SPDX-License-Identifier: MIT
4+ */
5+ package org .codejive .miniterm ;
6+
7+ import static org .assertj .core .api .Assertions .assertThat ;
8+
9+ import java .io .IOException ;
10+ import org .junit .jupiter .api .Test ;
11+
12+ class TerminalIT {
13+
14+ @ Test
15+ void terminalCanBeCreatedAndClosed () throws IOException {
16+ Terminal terminal = Terminal .create ();
17+ try {
18+ assertThat (terminal ).isNotNull ();
19+ assertThat (terminal .charset ()).isNotNull ();
20+ assertThat (terminal .rawModeEnabled ()).isFalse ();
21+ } finally {
22+ terminal .close ();
23+ }
24+ }
25+ }
Original file line number Diff line number Diff line change 8080 </archive >
8181 </configuration >
8282 </plugin >
83+ <plugin >
84+ <groupId >org.apache.maven.plugins</groupId >
85+ <artifactId >maven-failsafe-plugin</artifactId >
86+ <executions >
87+ <execution >
88+ <goals >
89+ <goal >integration-test</goal >
90+ <goal >verify</goal >
91+ </goals >
92+ </execution >
93+ </executions >
94+ </plugin >
8395 <plugin >
8496 <groupId >com.diffplug.spotless</groupId >
8597 <artifactId >spotless-maven-plugin</artifactId >
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright TamboUI and miniterm Contributors
3+ * SPDX-License-Identifier: MIT
4+ */
5+ package org .codejive .miniterm ;
6+
7+ import static org .assertj .core .api .Assertions .assertThat ;
8+
9+ import java .io .IOException ;
10+ import org .junit .jupiter .api .Test ;
11+
12+ class TerminalIT {
13+
14+ @ Test
15+ void terminalCanBeCreatedAndClosed () throws IOException {
16+ Terminal terminal = Terminal .create ();
17+ try {
18+ assertThat (terminal ).isNotNull ();
19+ assertThat (terminal .charset ()).isNotNull ();
20+ assertThat (terminal .rawModeEnabled ()).isFalse ();
21+ } finally {
22+ terminal .close ();
23+ }
24+ }
25+ }
Original file line number Diff line number Diff line change 9999 <artifactId >maven-surefire-plugin</artifactId >
100100 <version >3.5.5</version >
101101 </plugin >
102+ <plugin >
103+ <groupId >org.apache.maven.plugins</groupId >
104+ <artifactId >maven-failsafe-plugin</artifactId >
105+ <version >3.5.5</version >
106+ </plugin >
102107 <plugin >
103108 <groupId >org.apache.maven.plugins</groupId >
104109 <artifactId >maven-jar-plugin</artifactId >
You can’t perform that action at this time.
0 commit comments