diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index fca7eb7..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,115 +0,0 @@ -before_script: - - which git || (apt-get update -qq && apt-get install --no-install-recommends -qqqy git) - - git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/".insteadOf "git@gitlab.com:" - - git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/".insteadOf "https://gitlab.com/" --add - - | - julia -e ' - using Pkg - Pkg.Registry.add( - RegistrySpec(url = "https://github.com/JuliaRegistries/General.git") - ) - Pkg.Registry.add( - RegistrySpec(url = "https://gitlab.com/tensors4fields/tensors4fieldsregistry.git") - )' - -variables: - CI_JULIA_CACHE_DIR: ${CI_PROJECT_DIR}/julia_pkg - JULIA_DEPOT_PATH: ${CI_JULIA_CACHE_DIR} -cache: - key: - files: - - Project.toml - - docs/Project.toml - prefix: ${CI_JOB_NAME} - paths: - - ${CI_JULIA_CACHE_DIR} - -.script: - script: - - | - julia --project=@. -e ' - using Pkg - Pkg.build() - Pkg.test(coverage=true)' -.coverage: - coverage: /Test coverage (\d+\.\d+%)/ - after_script: - - | - julia -e ' - using Pkg - Pkg.add("Coverage") - using Coverage - c, t = get_summary(process_folder()) - using Printf - @printf "Test coverage %.2f%%\n" 100c / t' -Julia test: - image: julia:${JULIA_VERSION} - extends: - - .script - - .coverage - parallel: - matrix: - - JULIA_VERSION: - - "1.10" - - "1.6" - -.doctest: - script: - - | - julia --project=docs -e ' - using Pkg - Pkg.develop(PackageSpec(path=pwd())) - Pkg.instantiate() - using Documenter: doctest - using TCIAlgorithms - doctest(TCIAlgorithms) - include("docs/make.jl")' -doctest: - image: julia:1.6 - extends: - - .doctest -pages: - image: julia:1.6 - stage: deploy - extends: - - .doctest - after_script: - - mkdir -p public - - mv docs/build public/dev - artifacts: - paths: - - public - only: - - main - -CompatHelper: - image: julia:1 # Set to the Julia version you want to use - rules: - - if: $CI_PIPELINE_SOURCE == "schedule" - script: - - | - julia --color=yes -e " - import Pkg; - name = \"CompatHelper\"; - uuid = \"aa819f21-2bde-4658-8897-bab36330d9b7\"; - version = \"3\"; - Pkg.add(; name, uuid, version)" - - | - julia --color=yes -e " - import CompatHelper; - CompatHelper.main(;use_existing_registries=true)" - -JuliaFormatter: - image: julia:1 # Set to the Julia version you want to use - script: - - | - julia --color=yes -e " - import Pkg; - name = \"JuliaFormatter\"; - uuid = \"98e50ef6-434e-11e9-1051-2b60c6c9e899\"; - version = \"1\"; - Pkg.add(; name, uuid, version)" - - | - julia --color=yes -e " - import JuliaFormatter; - @assert(JuliaFormatter.format(\".\", verbose=true))" diff --git a/Project.toml b/Project.toml index 5407657..cb96d7e 100644 --- a/Project.toml +++ b/Project.toml @@ -4,43 +4,39 @@ authors = ["Hiroshi Shinaoka and contributors"] version = "0.4.7" [deps] -Coverage = "a2441757-f6aa-5fb2-8edb-039e3f45d037" -CoverageTools = "c36e975a-824b-4404-a568-ef97ca766997" Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b" EllipsisNotation = "da5c29d0-fa7d-589e-88eb-ea29b0a81949" FastMPOContractions = "f6e391d2-8ffa-4d7a-98cd-7e70024481ca" ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -LocalCoverage = "5f6e1e16-694c-5876-87ef-16b5274f298e" OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" Quantics = "87f76fb3-a40a-40c9-a63c-29fcfe7b7547" -QuanticsGrids = "634c7f73-3e90-4749-a1bd-001b8efc642d" -SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" TCIITensorConversion = "9f0aa9f4-9415-4e6a-8795-331ebf40aa04" TensorCrossInterpolation = "b261b2ec-6378-4871-b32e-9173bb050604" [compat] -Coverage = "1" -CoverageTools = "1" +Aqua = "0.8.9" EllipsisNotation = "1" FastMPOContractions = "0.2.2" HubbardAtoms = "0.1.0" ITensors = "0.6" -LocalCoverage = "0.8" +JET = "0.9.12" OrderedCollections = "1" Quantics = "0.3" -QuanticsGrids = "0.3.1" -SpecialFunctions = "2" +QuanticsGrids = "0.3.2" +SparseIR = "1.0.19" TCIITensorConversion = "0.1" TensorCrossInterpolation = "0.9.7" -julia = "1.6" +julia = "1.10" [extras] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" HubbardAtoms = "4f3da25b-ea28-4d4f-a81f-380d3f5e56a6" +JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" QuanticsGrids = "634c7f73-3e90-4749-a1bd-001b8efc642d" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" SparseIR = "4fe2279e-80f0-4adb-8463-ee114ff56b7d" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test", "Random", "QuanticsGrids", "SparseIR", "HubbardAtoms"] +test = ["Aqua", "JET", "Test", "Random", "QuanticsGrids", "SparseIR", "HubbardAtoms"] diff --git a/test/codequality_tests.jl b/test/codequality_tests.jl new file mode 100644 index 0000000..58dd01a --- /dev/null +++ b/test/codequality_tests.jl @@ -0,0 +1,14 @@ +using Test +using Aqua +using JET +using TCIAlgorithms + +@testset "Aqua.jl" begin + Aqua.test_all(TCIAlgorithms; deps_compat=false) +end + +#= +@testset "JET.jl" begin + JET.test_package(TCIAlgorithms; target_defined_modules=true) +end +=# diff --git a/test/runtests.jl b/test/runtests.jl index c62ef2a..6341d15 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -13,6 +13,7 @@ if nworkers() < MAX_WORKERS addprocs(max(0, MAX_WORKERS - nworkers())) end +include("codequality_tests.jl") include("_util.jl") include("util_tests.jl")