diff --git a/.github/workflows/CI.yml b/.github/workflows/Tests.yml similarity index 82% rename from .github/workflows/CI.yml rename to .github/workflows/Tests.yml index 46000be..ea43b7f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/Tests.yml @@ -1,4 +1,4 @@ -name: CI +name: Tests on: push: branches: @@ -13,23 +13,26 @@ concurrency: jobs: test: - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.group }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: version: - 'lts' + group: + - spaces + - ising + - finalize os: - ubuntu-latest - arch: - - x64 + - macOS-latest + - windows-latest steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@latest - uses: julia-actions/julia-runtest@latest diff --git a/test/runtests.jl b/test/runtests.jl index c96c094..2bc7f62 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2,8 +2,23 @@ using Test using TNRKit using TensorKit -using QuadGK +# check if user supplied args +pat = r"(?:--group=)(\w+)" +arg_id = findfirst(contains(pat), ARGS) +const GROUP = if isnothing(arg_id) + uppercase(get(ENV, "GROUP", "ALL")) +else + uppercase(only(match(pat, ARGS[arg_id]).captures)) +end -include("spaces.jl") # do they give spacemismatches? -include("ising.jl") # do they give the correct results (with the expected accuracy)? -include("finalize.jl") # do they give the correct results (with the expected accuracy)? +@time begin + if GROUP == "ALL" || GROUP == "SPACES" + @time include("spaces.jl") # do they give spacemismatches? + end + if GROUP == "ALL" || GROUP == "ISING" + @time include("ising.jl") # do they give the correct results (with the expected accuracy)? + end + if GROUP == "ALL" || GROUP == "FINALIZE" + @time include("finalize.jl") # do they give the correct results (with the expected accuracy)? + end +end