This repository was archived by the owner on Jun 18, 2026. It is now read-only.
refactor(graph-utils): extract subset-aware IndexedGraph ctor; dedupe… #736
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java-version: [11, 17] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up JDK ${{ matrix.java-version }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: ${{ matrix.java-version }} | |
| distribution: temurin | |
| - name: Download JUnit | |
| run: | | |
| mkdir -p Gvisual/lib/test | |
| curl -sL -o Gvisual/lib/test/junit-4.13.2.jar \ | |
| https://repo1.maven.org/maven2/junit/junit/4.13.2/junit-4.13.2.jar | |
| curl -sL -o Gvisual/lib/test/hamcrest-core-1.3.jar \ | |
| https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar | |
| - name: Compile source | |
| working-directory: Gvisual | |
| run: | | |
| set -e | |
| mkdir -p build/classes | |
| # Production sources only: anything under src/ that is NOT a *Test.java | |
| # (some test files are checked in under src/ alongside production code). | |
| # We still want them on the test classpath later, but they must not | |
| # be compiled with javac without junit on the path. | |
| find src -name '*.java' ! -name '*Test.java' > sources.txt | |
| MAIN_CP="$(find lib -name '*.jar' -not -path 'lib/test/*' | tr '\n' ':')" | |
| javac -encoding UTF-8 \ | |
| -source 11 -target 11 \ | |
| -cp "$MAIN_CP" \ | |
| -d build/classes \ | |
| @sources.txt | |
| - name: Compile tests | |
| working-directory: Gvisual | |
| run: | | |
| set -e | |
| mkdir -p build/test/classes | |
| # All *Test.java files, wherever they live (test/ tree plus a handful | |
| # that sit under src/ next to the code they exercise). | |
| find src test -name '*Test.java' > test-sources.txt | |
| TEST_CP="build/classes:$(find lib -name '*.jar' | tr '\n' ':')" | |
| javac -encoding UTF-8 \ | |
| -source 11 -target 11 \ | |
| -cp "$TEST_CP" \ | |
| -d build/test/classes \ | |
| @test-sources.txt | |
| - name: Run tests | |
| working-directory: Gvisual | |
| run: | | |
| java -cp "build/classes:build/test/classes:$(find lib -name '*.jar' | tr '\n' ':')" \ | |
| org.junit.runner.JUnitCore \ | |
| app.UtilMethodsTest \ | |
| gvisual.EdgeTest \ | |
| gvisual.EdgeTypeTest \ | |
| gvisual.QuadTreeTest \ | |
| gvisual.GraphStatsTest \ | |
| gvisual.ShortestPathFinderTest \ | |
| gvisual.GraphMLExporterTest \ | |
| gvisual.CommunityDetectorTest \ | |
| gvisual.NodeCentralityAnalyzerTest \ | |
| gvisual.ArticulationPointAnalyzerTest |