Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/ci-align.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Continuous integration for the align and distribute feature.
#
# Continuous integration means every change is built and tested automatically
# when it is proposed, so problems show up at the moment of the pull request
# instead of at merge time. This workflow builds the whole multi-module project
# and runs the tests on every pull request and on pushes to my feature branches.
#
# The file is named ci-align.yml on purpose. A teammate already added a ci.yml on
# another branch, so a separate name lets both pipelines run side by side and
# avoids a conflict on the workflow file when the branches merge.
name: CI Align and Distribute

on:
pull_request:
push:
branches:
- "phongsakon/**"

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v4

# The project compiles at Java 1.8 source level but is built with JDK 11,
# so the runner uses Temurin 11 to match the local toolchain.
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "11"
cache: maven

# A clean build of every module. Tests run by default, which is the point
# of the pipeline, so there is no -DskipTests here.
- name: Build and test with Maven
run: mvn --batch-mode --no-transfer-progress clean install
27 changes: 27 additions & 0 deletions jhotdraw-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,33 @@
<version>6.8.21</version>
<scope>test</scope>
</dependency>
<!-- The project already ships TestNG, but the lab asks for JUnit 4 and
notes that Swing and JUnit extensions work best with it. I add JUnit 4
next to TestNG rather than replacing it, so the existing tests keep
running and my new unit tests use JUnit 4. Surefire runs both in the
same build. "test" scope means it is only on the classpath for tests
and never ends up in the shipped jar. -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<!-- JGiven turns the user story into runnable Given-When-Then scenarios on
top of JUnit, and AssertJ gives the readable assertions the Then steps
use. Both are test scoped, so they never reach the shipped jar. -->
<dependency>
<groupId>com.tngtech.jgiven</groupId>
<artifactId>jgiven-junit</artifactId>
<version>1.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.24.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jhotdraw-actions</artifactId>
Expand Down
Loading
Loading