diff --git a/.appveyor.yml b/.appveyor.yml index 7f1766aef1..27ce392006 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,16 +1,13 @@ environment: + julia_version: 1.5 matrix: - - julia_version: 1.4 - - julia_version: nightly + - test_group: unit + - test_group: integration + - test_group: regression + - test_group: scripts platform: - - x64 # 64-bit - -# Uncomment the following lines to allow failures on nightly julia -# (tests will run but not make your overall status red) -matrix: - allow_failures: - - julia_version: nightly + - x64 branches: only: diff --git a/.codecov.yml b/.codecov.yml deleted file mode 100644 index ec2ddc0ab0..0000000000 --- a/.codecov.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Ignore Travis CI and Appveyor so accurate GPU coverage is reported by GitLab. -codecov: - ci: - - !appveyor - - !travis - -coverage: - status: - project: - default: - target: auto - threshold: 50 - base: auto - -comment: off diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d3d7dfbeb1..074771c33c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,31 +3,41 @@ include: image: ubuntu:bionic -variables: - CI_IMAGE_TAG: 'cuda' - JULIA_NUM_THREADS: '1' - -# Julia versions - -# the "primary" target, where we require a new GPU to make sure all tests are run -julia:1.4: +julia:1.4:unit: extends: - .julia:1.4 - .test + variables: + TEST_GROUP: 'unit' tags: - nvidia - - sm_70 + +julia:1.4:integration: + extends: + - .julia:1.4 + - .test variables: - CI_THOROUGH: 'true' + TEST_GROUP: 'integration' + tags: + - nvidia -julia:nightly: +julia:1.4:regression: extends: - - .julia:nightly + - .julia:1.4 - .test + variables: + TEST_GROUP: 'regression' tags: - nvidia - allow_failure: true +julia:1.4:scripts: + extends: + - .julia:1.4 + - .test + variables: + TEST_GROUP: 'scripts' + tags: + - nvidia coverage: extends: diff --git a/.travis.yml b/.travis.yml index d2fed7205e..8e66988b33 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,14 +8,22 @@ julia: - 1.4 env: - global: - - PYTHON='' + jobs: + - TEST_GROUP=unit + - TEST_GROUP=integration + - TEST_GROUP=regression + - TEST_GROUP=scripts + +# Only build pushes to master (PRs still build merge commits) +# See: https://stackoverflow.com/a/31882307 +branches: + only: + - master notifications: email: true after_success: - - julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'; - julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'; jobs: diff --git a/Dockerfile b/Dockerfile index 89eba4330a..701294bb1b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM julia:1.3 +FROM julia:1.4 LABEL maintainer="Ali Ramadhan " RUN apt-get update && apt-get install -y hdf5-tools diff --git a/README.md b/README.md index ed3dd2d922..62e998492f 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,6 @@ Codecov coverage - - Coveralls coverage -

Oceananigans.jl is a fast and friendly incompressible fluid flow solver written in Julia that can be run in 1-3 dimensions on CPUs and GPUs. It is designed to solve the rotating Boussinesq equations used in non-hydrostatic ocean modeling but can be used to solve for any incompressible flow. diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000000..5a03cc47aa --- /dev/null +++ b/codecov.yml @@ -0,0 +1,14 @@ +coverage: + range: 50..90 + round: down + precision: 2 + + status: + project: + default: + target: auto + threshold: 5% + patch: + default: + target: auto + threshold: 20% diff --git a/test/runtests.jl b/test/runtests.jl index 09261c98e9..eb5d8c4367 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -72,31 +72,44 @@ closures = ( ##### Run tests! ##### +group = get(ENV, "TEST_GROUP", "all") + include("runtests_utils.jl") @testset "Oceananigans" begin - include("test_grids.jl") - include("test_operators.jl") - include("test_boundary_conditions.jl") - include("test_fields.jl") - include("test_halo_regions.jl") - include("test_solvers.jl") - include("test_pressure_solvers.jl") - include("test_coriolis.jl") - include("test_buoyancy.jl") - include("test_surface_waves.jl") - include("test_models.jl") - include("test_simulations.jl") - include("test_time_stepping.jl") - include("test_time_stepping_bcs.jl") - include("test_forcings.jl") - include("test_turbulence_closures.jl") - include("test_dynamics.jl") - include("test_diagnostics.jl") - include("test_output_writers.jl") - include("test_abstract_operations.jl") - include("test_regression.jl") - include("test_examples.jl") - include("test_verification.jl") - include("test_benchmarks.jl") + if group == "unit" || group == "all" + @testset "Unit tests" begin + include("test_grids.jl") + include("test_operators.jl") + include("test_boundary_conditions.jl") + include("test_fields.jl") + include("test_halo_regions.jl") + include("test_solvers.jl") + include("test_pressure_solvers.jl") + include("test_coriolis.jl") + include("test_buoyancy.jl") + include("test_surface_waves.jl") + end + elseif group == "integration" || group == "all" + @testset "Integration tests" begin + include("test_models.jl") + include("test_simulations.jl") + include("test_time_stepping.jl") + include("test_time_stepping_bcs.jl") + include("test_forcings.jl") + include("test_turbulence_closures.jl") + include("test_dynamics.jl") + include("test_diagnostics.jl") + include("test_output_writers.jl") + include("test_abstract_operations.jl") + end + elseif group == "regression" || group == "all" + include("test_regression.jl") + elseif group == "scripts" || group == "all" + @testset "Scripts" begin + include("test_examples.jl") + include("test_verification.jl") + include("test_benchmarks.jl") + end + end end