Skip to content

Commit 0bb3f93

Browse files
Remove non-coverage tests (#109)
* Remove non-coverage tests * add upstream tests again
1 parent 7692ca7 commit 0bb3f93

File tree

5 files changed

+13
-88
lines changed

5 files changed

+13
-88
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -74,65 +74,29 @@ jobs:
7474
- run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)'
7575
- uses: julia-actions/cache@v2
7676
- uses: julia-actions/julia-buildpkg@v1
77-
- name: Run tests without coverage
78-
uses: julia-actions/julia-runtest@v1
79-
with:
80-
coverage: false
81-
env:
82-
PYTHON: ""
83-
TRIXI_TEST: ${{ matrix.trixi_test }}
84-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for authenticated downloads without strict rate limits
85-
86-
test_coverage:
87-
if: "!contains(github.event.head_commit.message, 'skip ci')"
88-
name: coverage - ${{ matrix.trixi_test }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
89-
runs-on: ${{ matrix.os }}
90-
strategy:
91-
fail-fast: false
92-
matrix:
93-
version:
94-
- '1.10'
95-
os:
96-
- ubuntu-latest
97-
arch:
98-
- x64
99-
trixi_test:
100-
- tree_1d
101-
- tree_2d
102-
- structured_2d
103-
- unstructured_2d
104-
- t8code_2d
105-
- dgmulti
106-
- p4est_2d
107-
- unit
108-
steps:
109-
- uses: actions/checkout@v4
110-
- uses: julia-actions/setup-julia@v2
111-
with:
112-
version: ${{ matrix.version }}
113-
arch: ${{ matrix.arch }}
114-
- run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)'
115-
- uses: julia-actions/cache@v2
116-
- uses: julia-actions/julia-buildpkg@v1
117-
- name: Run tests with coverage
77+
- name: Run tests
11878
uses: julia-actions/julia-runtest@v1
11979
with:
12080
coverage: true
12181
env:
12282
PYTHON: ""
12383
TRIXI_TEST: ${{ matrix.trixi_test }}
84+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for authenticated downloads without strict rate limits
12485
- name: Process coverage results
12586
uses: julia-actions/julia-processcoverage@v1
87+
if: ${{ !cancelled() }}
12688
with:
12789
directories: src,examples
12890
- name: Upload coverage report to Codecov
12991
uses: codecov/codecov-action@v5
92+
if: ${{ !cancelled() }}
13093
with:
13194
files: lcov.info
13295
env:
13396
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # now required for public repos
13497
- name: Upload coverage report to Coveralls
13598
uses: coverallsapp/github-action@v2
99+
if: ${{ !cancelled() }}
136100
with:
137101
github-token: ${{ secrets.GITHUB_TOKEN }}
138102
path-to-lcov: ./lcov.info

test/test_p4est_2d.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ isdir(outdir) && rm(outdir, recursive = true)
140140
3.576650520299362,
141141
0.7495177590247986
142142
],
143-
tspan=(0.0, 0.025),
144-
coverage_override=(maxiters = 5,))
143+
tspan=(0.0, 0.025))
145144
# Ensure that we do not have excessive memory allocations
146145
# (e.g., from type instabilities)
147146
let
@@ -195,8 +194,7 @@ end # SWE
195194
3.292431218004944,
196195
3.3701108685790135,
197196
0.7495177590247986],
198-
tspan=(0.0, 0.01),
199-
coverage_override=(maxiters = 5,))
197+
tspan=(0.0, 0.01))
200198

201199
# Ensure that we do not have excessive memory allocations
202200
# (e.g., from type instabilities)
@@ -252,7 +250,6 @@ end # SWE
252250
1.324711724284584e-11,
253251
0.044079775502972124],
254252
tspan=(0.0, 0.3),
255-
coverage_override=(maxiters = 5,),
256253
atol=1e-10)
257254

258255
# Ensure that we do not have excessive memory allocations

test/test_tree_1d.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,8 +1012,7 @@ end # 2LSWE
10121012
1.6653345369377348e-16
10131013
],
10141014
tspan=(0.0, 0.25),
1015-
atol=1e-9,
1016-
coverage_override=(maxiters = 15,))
1015+
atol=1e-9)
10171016
# Ensure that we do not have excessive memory allocations
10181017
# (e.g., from type instabilities)
10191018
let

test/test_tree_2d.jl

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,7 @@ isdir(outdir) && rm(outdir, recursive = true)
433433
1.3874204364467229,
434434
1.3874204364467246,
435435
0.0
436-
],
437-
# Increase iterations for coverage testing to trigger both inflow and outflow conditions
438-
coverage_override=(maxiters = 65, tspan = (0.0, 2.5)))
436+
])
439437
# Ensure that we do not have excessive memory allocations
440438
# (e.g., from type instabilities)
441439
let
@@ -472,9 +470,7 @@ isdir(outdir) && rm(outdir, recursive = true)
472470
boundary_conditions=(x_neg = boundary_condition_outflow,
473471
x_pos = boundary_condition_inflow,
474472
y_neg = boundary_condition_outflow,
475-
y_pos = boundary_condition_inflow),
476-
# Increase iterations for coverage testing to trigger both inflow and outflow conditions
477-
coverage_override=(maxiters = 65, tspan = (0.0, 2.5)))
473+
y_pos = boundary_condition_inflow))
478474
# Ensure that we do not have excessive memory allocations
479475
# (e.g., from type instabilities)
480476
let
@@ -879,10 +875,7 @@ end # 2LSWE
879875
0.026626783423061535,
880876
0.1016120899921184
881877
],
882-
tspan=(0.0, 0.25),
883-
# Increase iterations for coverage testing to trigger the
884-
# positivity limiter
885-
coverage_override=(maxiters = 130, tspan = (0.0, 1.5)))
878+
tspan=(0.0, 0.25))
886879
# Ensure that we do not have excessive memory allocations
887880
# (e.g., from type instabilities)
888881
let

test/test_trixi.jl

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,43 +24,15 @@ macro test_trixi_include(elixir, args...)
2424
rtol_default = sqrt(eps(RealT))
2525
local atol = get_kwarg(args, :atol, atol_default)
2626
local rtol = get_kwarg(args, :rtol, rtol_default)
27-
local skip_coverage = get_kwarg(args, :skip_coverage, false)
28-
local coverage_override = expr_to_named_tuple(get_kwarg(args, :coverage_override, :()))
29-
if !(:maxiters in keys(coverage_override))
30-
# maxiters in coverage_override defaults to 1
31-
coverage_override = (; coverage_override..., maxiters = 1)
32-
end
33-
34-
local cmd = string(Base.julia_cmd())
35-
local coverage = occursin("--code-coverage", cmd) &&
36-
!occursin("--code-coverage=none", cmd)
3727

3828
local kwargs = Pair{Symbol, Any}[]
3929
for arg in args
4030
if (arg.head == :(=) &&
41-
!(arg.args[1] in (:l2, :linf, :atol, :rtol, :coverage_override, :skip_coverage))
42-
&& !(coverage && arg.args[1] in keys(coverage_override)))
31+
!(arg.args[1] in (:l2, :linf, :atol, :rtol)))
4332
push!(kwargs, Pair(arg.args...))
4433
end
4534
end
4635

47-
if coverage
48-
for key in keys(coverage_override)
49-
push!(kwargs, Pair(key, coverage_override[key]))
50-
end
51-
end
52-
53-
if coverage && skip_coverage
54-
return quote
55-
if Trixi.mpi_isroot()
56-
println(""^100)
57-
println("Skipping coverage test of ", $elixir)
58-
println(""^100)
59-
println("\n\n")
60-
end
61-
end
62-
end
63-
6436
quote
6537
Trixi.mpi_isroot() && println(""^100)
6638
Trixi.mpi_isroot() && println($elixir)
@@ -79,7 +51,7 @@ macro test_trixi_include(elixir, args...)
7951
@test_nowarn_mod trixi_include(@__MODULE__, $elixir; $kwargs...) additional_ignore_content
8052

8153
# if present, compare l2 and linf errors against reference values
82-
if !$coverage && (!isnothing($l2) || !isnothing($linf))
54+
if !isnothing($l2) || !isnothing($linf)
8355
l2_measured, linf_measured = analysis_callback(sol)
8456

8557
if Trixi.mpi_isroot() && !isnothing($l2)

0 commit comments

Comments
 (0)