@@ -19,21 +19,24 @@ jobs:
1919 - name : Checkout Code Repository
2020 uses : actions/checkout@v3
2121
22- - name : Set up Python 3.9
22+ - name : Set up Python 3.13
2323 uses : actions/setup-python@v4
2424 with :
25- python-version : 3.9
25+ python-version : " 3.13 "
2626
2727 # Run all pre-commit hooks on all the files.
2828 # Getting only staged files can be tricky in case a new PR is opened
2929 # since the action is run on a branch in detached head state.
3030 # This is the equivalent of running "pre-commit run --all-files" locally.
3131 # If you commit with the `--no-verify` flag, this check may fail.
3232 - name : Install and Run Pre-commit
33- uses :
pre-commit/[email protected] .0 33+ uses :
pre-commit/[email protected] .1 3434
3535 build :
3636 runs-on : ubuntu-latest
37+ strategy :
38+ matrix :
39+ python-version : ["3.11", "3.12", "3.13"]
3740 defaults :
3841 run :
3942 shell : bash -l {0}
@@ -44,11 +47,11 @@ jobs:
4447 - name : Cache Conda
4548 uses : actions/cache@v3
4649 env :
47- CACHE_NUMBER : 0
50+ CACHE_NUMBER : 1 # Increment this to invalidate cache
4851 with :
4952 path : ~/conda_pkgs_dir
5053 key : ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
51- hashFiles('conda/dev.yml') }}
54+ hashFiles('conda/dev.yml') }}-python${{ matrix.python-version }}
5255
5356 - name : Build Conda Environment
5457 uses : conda-incubator/setup-miniconda@v3
@@ -57,13 +60,27 @@ jobs:
5760 miniforge-variant : Miniforge3
5861 miniforge-version : latest
5962 environment-file : conda/dev.yml
60- channel-priority : strict
63+ channel-priority : flexible # Changed from strict to flexible
6164 auto-update-conda : true
65+ python-version : ${{ matrix.python-version }}
66+ channels : conda-forge
67+ use-only-tar-bz2 : true
68+
69+ - name : Verify Environment and Fix Dependencies
70+ run : |
71+ conda info
72+ conda list
73+ # Ensure we have the right Python version
74+ python --version
75+ # Fix pip issues for Python 3.12+
76+ if [[ "${{ matrix.python-version }}" == "3.12" ]] || [[ "${{ matrix.python-version }}" == "3.13" ]]; then
77+ python -m ensurepip --upgrade || true
78+ python -m pip install --upgrade --force-reinstall pip setuptools wheel
79+ fi
6280
6381 - name : Install `zstash` Package
6482 run : |
65- python -m pip install --upgrade pip
66- pip install .
83+ python -m pip install .
6784
6885 - name : Run Tests
6986 run : |
7794 defaults :
7895 run :
7996 shell : bash -l {0}
80- timeout-minutes : 5
97+ timeout-minutes : 10 # Increased timeout for docs
8198 steps :
8299 - uses : actions/checkout@v3
83100 with :
@@ -87,11 +104,11 @@ jobs:
87104 - name : Cache Conda
88105 uses : actions/cache@v3
89106 env :
90- CACHE_NUMBER : 0
107+ CACHE_NUMBER : 1 # Match the build job cache number
91108 with :
92109 path : ~/conda_pkgs_dir
93110 key : ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
94- hashFiles('conda/dev.yml') }}
111+ hashFiles('conda/dev.yml') }}-docs
95112
96113 - name : Build Conda Environment
97114 uses : conda-incubator/setup-miniconda@v3
@@ -100,8 +117,9 @@ jobs:
100117 miniforge-variant : Miniforge3
101118 miniforge-version : latest
102119 environment-file : conda/dev.yml
103- channel-priority : strict
120+ channel-priority : flexible # Changed from strict to flexible
104121 auto-update-conda : true
122+ python-version : " 3.13" # Use stable Python version for docs
105123
106124 # sphinx-multiversion allows for version docs.
107125 - name : Build Sphinx Docs
0 commit comments