Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
govindchari committed Aug 6, 2023
1 parent 7c20950 commit d27d8c8
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 14 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ['1.7']
julia-arch: [x64]
os: [ubuntu-latest] # [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v3
41 changes: 27 additions & 14 deletions test/examples/rendezvous_3d/tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,17 @@ function test_single(
@test sol.status == @sprintf("%s", SCP_SOLVED)

# Make plots
plot_trajectory_2d(mdl, sol)
plot_trajectory_2d(mdl, sol; attitude = true)
plot_state_timeseries(mdl, sol)
plot_inputs(mdl, sol, history)
plot_inputs(mdl, sol, history; quad = "D")
plot_cost_evolution(mdl, history)
try
plot_trajectory_2d(mdl, sol)
plot_trajectory_2d(mdl, sol; attitude = true)
plot_state_timeseries(mdl, sol)
plot_inputs(mdl, sol, history)
plot_inputs(mdl, sol, history; quad = "D")
plot_cost_evolution(mdl, history)
catch e
println("PyPlot Issues")
end


return sol, history
end
Expand Down Expand Up @@ -151,13 +156,17 @@ function test_runtime(
@test sol.status == @sprintf("%s", SCP_SOLVED)
end

plot_convergence(
history_list,
"rendezvous_3d",
options = fig_opts,
xlabel = "\$\\ell\$",
horizontal = true,
)
try
plot_convergence(
history_list,
"rendezvous_3d",
options = fig_opts,
xlabel = "\$\\ell\$",
horizontal = true,
)
catch
println("PyPlot Issues")
end

return history_list
end
Expand Down Expand Up @@ -213,7 +222,11 @@ function test_homotopy_update(
@test sol_list[i].status == @sprintf("%s", SCP_SOLVED)
end

plot_homotopy_threshold_sweep(mdl, β_sweep, sol_list)
try
plot_homotopy_threshold_sweep(mdl, β_sweep, sol_list)
catch e
println("PyPlot Issues")
end

return β_sweep, sol_list
end
Expand Down

0 comments on commit d27d8c8

Please sign in to comment.