Skip to content

Commit 0d54f76

Browse files
authored
Merge pull request #14 from dojo-sim/cleanup_tests
Cleanup tests
2 parents d72135e + 01672d9 commit 0d54f76

24 files changed

+1653
-1891
lines changed

.github/workflows/CI.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ jobs:
99
test:
1010
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
1111
runs-on: ${{ matrix.os }}
12-
# if: ${{ contains(github.event.head_commit.message, 'run_ci') }}
1312
strategy:
1413
matrix:
1514
version:
16-
- '1.7'
15+
- '1.6' # LTS
16+
- '1' # Current Stable
1717
os:
1818
- ubuntu-latest
19-
# - macOS-latest
20-
# - windows-latest
19+
- macOS-latest
20+
- windows-latest
2121
arch:
2222
- x64
2323
steps:
@@ -26,6 +26,7 @@ jobs:
2626
with:
2727
version: ${{ matrix.version }}
2828
arch: ${{ matrix.arch }}
29+
# - uses: julia-actions/julia-buildpkg@latest
2930
- uses: julia-actions/julia-runtest@latest
3031
- uses: julia-actions/julia-uploadcodecov@latest
3132
env:

.github/workflows/Documenter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v2
1515
- uses: julia-actions/setup-julia@latest
1616
with:
17-
version: '1.6'
17+
version: '1'
1818
- name: Install dependencies
1919
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
2020
- name: Build and deploy

.github/workflows/dailyCI.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ jobs:
66
test:
77
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
88
runs-on: ${{ matrix.os }}
9+
continue-on-error: ${{ matrix.version == 'nightly'}}
910
strategy:
1011
matrix:
1112
version:
12-
- '1.6'
13+
- '1.6' # LTS
14+
- '1' # Current Stable
15+
- 'nightly' # Upcoming
1316
os:
1417
- ubuntu-latest
1518
- macOS-latest
@@ -22,6 +25,7 @@ jobs:
2225
with:
2326
version: ${{ matrix.version }}
2427
arch: ${{ matrix.arch }}
28+
# - uses: julia-actions/julia-buildpkg@latest
2529
- uses: julia-actions/julia-runtest@latest
2630
- uses: julia-actions/julia-uploadcodecov@latest
2731
env:

Project.toml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "Dojo"
22
uuid = "ac60b53e-8d92-4c83-b960-e78698fa1916"
3-
authors = ["simonlc <simonlc@stanford.edu>", "thowell <thowell@stanford.edu>", "Jan Bruedigam"]
3+
authors = ["simonlc <simonlc@stanford.edu>", "thowell <thowell@stanford.edu>", "Jan Bruedigam <jan.bruedigam@tum.de>"]
44
version = "0.1.0"
55

66
[deps]
@@ -43,3 +43,12 @@ Quaternions = "<0.5.3, 0.5.3"
4343
Scratch = "1.1"
4444
StaticArrays = "1.2"
4545
julia = "1.6, 1.7"
46+
47+
[extras]
48+
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
49+
FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41"
50+
Rotations = "6038ab10-8711-5258-84ad-4b1120ba62dc"
51+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
52+
53+
[targets]
54+
test = ["BenchmarkTools", "FiniteDiff", "Rotations", "Test"]

test/Manifest.toml

Lines changed: 0 additions & 225 deletions
This file was deleted.

test/Project.toml

Lines changed: 0 additions & 17 deletions
This file was deleted.

test/behaviors.jl

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@testset "Behavior: Quadruped simulation" begin
1+
@testset "Quadruped" begin
22
mech = get_mechanism(:quadruped,
33
timestep=0.05,
44
gravity=-9.81,
@@ -8,17 +8,15 @@
88

99
initialize!(mech, :quadruped)
1010

11-
try
12-
storage = simulate!(mech, 5.0,
11+
storage = simulate!(mech, 5.0,
1312
record=true,
1413
verbose=false)
15-
@test true
16-
catch
17-
@test false
18-
end
14+
15+
res = get_sdf(mech, storage) # distance from floor to each contact
16+
@test minimum(minimum([min.(0.0, r) for r in res])) >= 0.0
1917
end
2018

21-
@testset "Behavior: Box toss" begin
19+
@testset "Box toss" begin
2220
for timestep in [0.10, 0.05, 0.01, 0.005]
2321
mech = get_mechanism(:box,
2422
timestep=timestep,
@@ -39,7 +37,7 @@ end
3937
end
4038
end
4139

42-
@testset "Behavior: Four-bar linkage" begin
40+
@testset "Four-bar linkage" begin
4341
for timestep in [0.10, 0.05, 0.01, 0.005]
4442
mech = Dojo.get_mechanism(:fourbar,
4543
model="fourbar",
@@ -63,7 +61,7 @@ end
6361
end
6462
end
6563

66-
@testset "Behavior: Tennis Racket" begin
64+
@testset "Tennis racket" begin
6765
# Simulation
6866
timestep=0.01
6967
gravity=0.0

test/bodies.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@testset "Bodies: Shapes" begin
1+
@testset "Shape convertion" begin
22
# shapes
33
box = Dojo.Box(1.0, 1.0, 1.0)
44
cylinder = Dojo.Cylinder(1.0, 1.0)
@@ -8,7 +8,7 @@
88
pyramid = Dojo.Pyramid(1.0, 1.0)
99
mesh = Dojo.Mesh(joinpath(@__DIR__, "../environments/atlas/deps/mesh/head.obj"))
1010

11-
# convert
11+
# convert
1212
box_geom = Dojo.convert_shape(box)
1313
cylinder_geom = Dojo.convert_shape(cylinder)
1414
capsule_geom = Dojo.convert_shape(capsule)
@@ -18,5 +18,3 @@
1818
mesh_geom = Dojo.convert_shape(mesh)
1919
@test true
2020
end
21-
22-

0 commit comments

Comments
 (0)