Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2322ad8
update testing infrastructure and Project.toml
lkdvos Mar 24, 2026
f7d67cf
simplify testcode include
lkdvos Mar 24, 2026
aeaa772
update CI instructions
lkdvos Mar 24, 2026
4a0ec7c
add fast testing
lkdvos Mar 24, 2026
863e031
add a readme file
lkdvos Mar 24, 2026
e8f72ee
small fixes
lkdvos Mar 24, 2026
8123e5c
run fast tests in draft mode
lkdvos Mar 24, 2026
40fc7b9
rework some test infrastructure again
lkdvos Mar 25, 2026
8e6cea4
small changes to avoid accidental diagonal tensors
lkdvos Mar 25, 2026
27262b5
split up chainrules tests
lkdvos Mar 25, 2026
609e132
split up factorization tests
lkdvos Mar 25, 2026
2d1bb3f
split up tensor tests
lkdvos Mar 25, 2026
4912db6
split up fusiontree tests
lkdvos Mar 25, 2026
09a15d2
more shared code in the setup
lkdvos Mar 26, 2026
df84408
fix Mooncake test
lkdvos Mar 27, 2026
0eae543
fix version of downgrade-compat
lkdvos Mar 27, 2026
aba72e8
remove unneeded exports
lkdvos Mar 30, 2026
8881024
simplify chainrules testsets
lkdvos Mar 30, 2026
c740ec1
simplify mooncake testsets
lkdvos Mar 30, 2026
54ad031
update all versions of actions [skip ci]
lkdvos Mar 30, 2026
7675967
only test compat on latest version
lkdvos Mar 30, 2026
3ffa0ed
incorporate code suggestions
lkdvos Mar 30, 2026
d05c43f
remove `_project_hermitian`
lkdvos Mar 30, 2026
52ba0e5
final tweaks to testsetup
lkdvos Mar 31, 2026
85c1b92
properly filter cuda tests
lkdvos Mar 31, 2026
c2d01af
small fixes for CUDA
lkdvos Mar 31, 2026
3d638c2
Fix CUDA tests for IsingBimodule
kshyatt Apr 2, 2026
ecb67a0
whole lotta change
Jutho Apr 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
153 changes: 115 additions & 38 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
paths-ignore:
- 'docs/**'
pull_request:
types: [opened, synchronize, reopened, ready_for_review, converted_to_draft]
workflow_dispatch:

concurrency:
Expand All @@ -19,55 +20,131 @@ concurrency:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
setup-matrix:
runs-on: ubuntu-latest
outputs:
groups: ${{ steps.mk.outputs.groups }}
version: ${{ steps.mk.outputs.version }}
os: ${{ steps.mk.outputs.os }}
steps:
- uses: actions/checkout@v6
- id: mk
shell: bash
run: |
# Auto-discover test groups from all subdirectory names.
groups=$(find test -mindepth 1 -maxdepth 1 -type d \
| xargs -I{} basename {} | sort \
| jq -R -s -c '[split("\n")[] | select(length > 0)]')

echo "groups=${groups}" >> "$GITHUB_OUTPUT"

# Draft PR: only run ubuntu-latest + version=1
if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.event.pull_request.draft }}" == "true" ]]; then
echo 'version=["1"]' >> "$GITHUB_OUTPUT"
echo 'os=["ubuntu-latest"]' >> "$GITHUB_OUTPUT"
else
echo 'version=["lts","1"]' >> "$GITHUB_OUTPUT"
echo 'os=["ubuntu-latest","macOS-latest","windows-latest"]' >> "$GITHUB_OUTPUT"
fi

test:
name: "Tests (${{ matrix.group }}, ${{ matrix.os }}, Julia ${{ matrix.version }})"
needs: setup-matrix
strategy:
fail-fast: false
matrix:
version:
- 'lts'
- '1'
group:
- symmetries
- tensors
- other
- mooncake
- chainrules
os:
- ubuntu-latest
- macOS-latest
- windows-latest
uses: "QuantumKitHub/QuantumKitHubActions/.github/workflows/Tests.yml@main"
with:
group: "${{ matrix.group }}"
julia-version: "${{ matrix.version }}"
os: "${{ matrix.os }}"
nthreads: 4
timeout-minutes: 120
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
version: ${{ fromJSON(needs.setup-matrix.outputs.version) }}
os: ${{ fromJSON(needs.setup-matrix.outputs.os) }}
group: ${{ fromJSON(needs.setup-matrix.outputs.groups) }}
runs-on: ${{ matrix.os }}
timeout-minutes: 120
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@v3
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
with:
test_args: '${{ matrix.group }}${{ github.event.pull_request.draft == true && '' --fast'' || '''' }}'
env:
JULIA_NUM_THREADS: "4"
- uses: julia-actions/julia-processcoverage@v1
with:
directories: 'src,ext'
- uses: codecov/codecov-action@v6
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false

test-nightly:
needs: test
name: "Tests (${{ matrix.group }}, ${{ matrix.os }}, Julia nightly)"
needs: [setup-matrix, test]
if: github.event.pull_request.draft != true
strategy:
fail-fast: false
matrix:
version:
- 'nightly'
group:
- symmetries
- tensors
- other
- mooncake
- chainrules
group: ${{ fromJSON(needs.setup-matrix.outputs.groups) }}
os:
- ubuntu-latest
- macOS-latest
- windows-latest
uses: "QuantumKitHub/QuantumKitHubActions/.github/workflows/Tests.yml@main"
with:
group: "${{ matrix.group }}"
julia-version: "${{ matrix.version }}"
os: "${{ matrix.os }}"
nthreads: 4
timeout-minutes: 120
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
runs-on: ${{ matrix.os }}
timeout-minutes: 120
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@v3
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
with:
test_args: '${{ matrix.group }}'

CI:
name: "CI Summary"
needs: [test, compatcheck]
if: always()
runs-on: ubuntu-latest
steps:
- name: Check test jobs
run: |
if [[ "${{ needs.test.result }}" != "success" ]]; then
echo "Tests failed: ${{ needs.test.result }}"
exit 1
fi
echo "Tests passed."
- name: Report compat check
run: |
echo "Compat check result: ${{ needs.compatcheck.result }}"
continue-on-error: true

compatcheck:
name: "Compat (${{ matrix.group }}, Julia ${{ matrix.julia-version }})"
needs: [setup-matrix, test]
if: github.event.pull_request.draft != true
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
downgrade_mode: ['deps']
group: ${{ fromJSON(needs.setup-matrix.outputs.groups) }}
julia-version: ['1', '1.10']
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/cache@v3
- uses: julia-actions/julia-downgrade-compat@v2
with:
mode: ${{ matrix.downgrade_mode }}
skip: Random, LinearAlgebra, Test, Combinatorics
julia_version: ${{ matrix.julia-version }}
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
38 changes: 0 additions & 38 deletions .github/workflows/CompatCheck.yml

This file was deleted.

37 changes: 3 additions & 34 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,59 +33,28 @@ TensorKitChainRulesCoreExt = "ChainRulesCore"
TensorKitFiniteDifferencesExt = "FiniteDifferences"
TensorKitMooncakeExt = "Mooncake"

[workspace]
projects = ["test"]

[compat]
Adapt = "4"
AllocCheck = "0.2.3"
Aqua = "0.6, 0.7, 0.8"
ArgParse = "1.2.0"
CUDA = "5.9"
ChainRulesCore = "1"
ChainRulesTestUtils = "1"
Combinatorics = "1"
Dictionaries = "0.4"
FiniteDifferences = "0.12"
GPUArrays = "11.3.1"
JET = "0.9, 0.10, 0.11"
LRUCache = "1.0.2"
LinearAlgebra = "1"
MatrixAlgebraKit = "0.6.5"
Mooncake = "0.5"
OhMyThreads = "0.8.0"
Printf = "1"
Random = "1"
SafeTestsets = "0.1"
ScopedValues = "1.3.0"
Strided = "2"
TensorKitSectors = "0.3.6"
TensorOperations = "5.1"
Test = "1"
TestExtras = "0.2,0.3"
TupleTools = "1.5"
VectorInterface = "0.4.8, 0.5"
Zygote = "0.7"
cuTENSOR = "2"
julia = "1.10"

[extras]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
AllocCheck = "9b6a8646-10ed-4001-bbdc-1d2f46dfbb1a"
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a"
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000"
GPUArrays = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
TensorOperations = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestExtras = "5ed8adda-3752-4e41-b88a-e8b09835ee3a"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1"

[targets]
test = ["ArgParse", "Adapt", "Aqua", "AllocCheck", "Combinatorics", "CUDA", "cuTENSOR", "GPUArrays", "JET", "LinearAlgebra", "SafeTestsets", "TensorOperations", "Test", "TestExtras", "ChainRulesCore", "ChainRulesTestUtils", "FiniteDifferences", "Zygote", "Mooncake"]
Loading
Loading