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
35 changes: 35 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Road Runner CI

on:
push:
branches: [ "master", "main" ]
pull_request:
branches: [ "master", "main" ]
workflow_dispatch:

defaults:
run:
working-directory: road-runner

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
validate-wrappers: true
- name: Build with Gradle
run: ./gradlew build

- name: Store test reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: Test reports
path: |
**/build/reports/
**/build/test-results/
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ class LabelAction(private val s: String) : Action {
}

class ActionRegressionTest {
@Test
@Strictfp
fun testTrajectoryActionBuilder() {
companion object {
@JvmField
val base =
TrajectoryActionBuilder(
{ TurnAction(it) },
Expand All @@ -58,7 +57,11 @@ class ActionRegressionTest {
TranslationalVelConstraint(20.0),
ProfileAccelConstraint(-10.0, 10.0),
)
}

@Test
@Strictfp
fun testTrajectoryActionBuilder() {
assertEquals(
"SequentialAction(initialActions=[Trajectory])",
base
Expand All @@ -75,7 +78,11 @@ class ActionRegressionTest {
.build()
.toString(),
)
}

@Test
@Strictfp
fun testTrajectoryContinuity() {
assertEquals(
"SequentialAction(initialActions=[Trajectory, SleepAction(dt=10.0), Trajectory])",
base
Expand All @@ -96,7 +103,11 @@ class ActionRegressionTest {
.build()
.toString()
)
}

@Test
@Strictfp
fun testTrajectoryTimeMarkers() {
assertEquals(
"SequentialAction(initialActions=[Trajectory, Trajectory, ParallelAction(initialActions=[" +
"SequentialAction(initialActions=" +
Expand Down Expand Up @@ -136,7 +147,11 @@ class ActionRegressionTest {
.build()
.toString()
)
}

@Test
@Strictfp
fun testTrajectoryDispMarkers() {
assertFails {
base
.afterDisp(1.0, LabelAction("A"))
Expand Down
Loading