diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f1de667..2c8e8a4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -36,19 +36,22 @@ jobs: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - uses: julia-actions/cache@v2 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-test-${{ env.cache-name }}- - ${{ runner.os }}-test- - ${{ runner.os }}- - run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev - name: Install Julia dependencies and run tests - run: | - JULIA_REFERENCETESTS_UPDATE=true DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --depwarn=yes -e 'using Pkg; Pkg.activate(temp=true); Pkg.develop(path="."); Pkg.test("ITensorGLMakie")' + id: referencetests + continue-on-error: true + run: > + DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --depwarn=yes -e 'using Pkg; Pkg.activate(temp=true); Pkg.Registry.update(); Pkg.update(); Pkg.develop(path="."); Pkg.test("ITensorGLMakie")' + && echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV + - name: Upload test Artifacts + uses: actions/upload-artifact@v4 + with: + name: ReferenceImages_ITensorGLMakie_${{ matrix.version }} + path: | + ./test/references/ + - name: Fail after artifacts if tests failed + if: ${{ env.TESTS_SUCCESSFUL != 'true' }} + run: exit 1 - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v4 with: diff --git a/.gitignore b/.gitignore index f1ba1d6..296f36a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .*.swp +.DS_Store Manifest.toml diff --git a/docs/make.jl b/docs/make.jl index 752da44..c684f19 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,9 +1,7 @@ using ITensorGLMakie using Documenter -DocMeta.setdocmeta!( - ITensorGLMakie, :DocTestSetup, :(using ITensorGLMakie); recursive=true -) +DocMeta.setdocmeta!(ITensorGLMakie, :DocTestSetup, :(using ITensorGLMakie); recursive=true) makedocs(; modules=[ITensorGLMakie], diff --git a/examples/ex_qn_mps.jl b/examples/ex_qn_mps.jl index f4c1b1b..8a3573d 100644 --- a/examples/ex_qn_mps.jl +++ b/examples/ex_qn_mps.jl @@ -1,4 +1,5 @@ using ITensors +using ITensorMPS using ITensorGLMakie s = siteinds("S=1/2", 5; conserve_qns=true) diff --git a/examples/ex_quantum_circuit.jl b/examples/ex_quantum_circuit.jl index 87fecf9..575eba1 100644 --- a/examples/ex_quantum_circuit.jl +++ b/examples/ex_quantum_circuit.jl @@ -1,4 +1,5 @@ using ITensors +using ITensorMPS using ITensorGLMakie using LayeredLayouts using Graphs diff --git a/examples/notest_ex_2d_circuit.jl b/examples/notest_ex_2d_circuit.jl index 562cba6..e981156 100644 --- a/examples/notest_ex_2d_circuit.jl +++ b/examples/notest_ex_2d_circuit.jl @@ -1,4 +1,5 @@ using ITensors +using ITensorMPS using ITensorGLMakie using Graphs using PastaQ: randomcircuit diff --git a/examples/notest_ex_qft_circuit.jl b/examples/notest_ex_qft_circuit.jl index a627ace..806b687 100644 --- a/examples/notest_ex_qft_circuit.jl +++ b/examples/notest_ex_qft_circuit.jl @@ -1,4 +1,5 @@ using ITensors +using ITensorMPS using ITensorGLMakie using Graphs using PastaQ: qft diff --git a/src/ITensorGLMakie.jl b/src/ITensorGLMakie.jl index 22b90ca..98d372e 100644 --- a/src/ITensorGLMakie.jl +++ b/src/ITensorGLMakie.jl @@ -5,4 +5,4 @@ using GLMakie @reexport using ITensorMakie -end # module +end diff --git a/test/Project.toml b/test/Project.toml index 8bc48ec..3a5369f 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -2,6 +2,7 @@ GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326" Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" ITensorGLMakie = "3f718f31-6db8-4f43-a433-67cb5c73363e" +ITensorMPS = "0d1a4710-d33b-49a5-8f18-73bdf49b47e2" ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5" LayeredLayouts = "f4a74d36-062a-4d48-97cd-1356bad1de4e" NDTensors = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf" diff --git a/test/references/R.png b/test/references/R.png index f5ad766..43333eb 100644 Binary files a/test/references/R.png and b/test/references/R.png differ diff --git a/test/references/R1.png b/test/references/R1.png index 354701a..338f281 100644 Binary files a/test/references/R1.png and b/test/references/R1.png differ diff --git a/test/references/R2.png b/test/references/R2.png index e88d9af..349d2de 100644 Binary files a/test/references/R2.png and b/test/references/R2.png differ diff --git a/test/references/T.png b/test/references/T.png index 2b06042..80dea94 100644 Binary files a/test/references/T.png and b/test/references/T.png differ diff --git a/test/references/tn.png b/test/references/tn.png index 276cc6b..54174a1 100644 Binary files a/test/references/tn.png and b/test/references/tn.png differ