diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index cf16bc5..eba47cf 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -36,9 +36,11 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v5 with: files: lcov.info + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} docs: name: Documentation runs-on: ubuntu-latest diff --git a/test/runtests.jl b/test/runtests.jl index e776b16..ffaf406 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -44,6 +44,10 @@ end m4 = maxnet(p_a, env[(:ecoreg,)], addsamplestobackground =false) m5 = maxnet(p_a, env[(:cld6190_ann, :h_dem)]; features = "ht", n_knots = 3) + # test that the model throws an error if there are no presences + @test_throws "All data points are absences" maxnet(falses(length(p_a)), env) + @test_throws "All data points are presences" maxnet(trues(length(p_a)), env) + # test the results @test m.entropy ≈ 6.114650341746531 @test complexity(m) == 21