@@ -37,23 +37,26 @@ jobs:
3737 - name : Checkout Code Repository
3838 uses : actions/checkout@v3
3939
40- - name : Set up Python
40+ - name : Set up Python 3.13
4141 uses : actions/setup-python@v4
4242 with :
43- python-version : 3.9
43+ python-version : 3.13
4444
4545 # Run all pre-commit hooks on all the files.
4646 # Getting only staged files can be tricky in case a new PR is opened
4747 # since the action is run on a branch in detached head state.
4848 # This is the equivalent of running "pre-commit run --all-files" locally.
4949 # If you commit with the `--no-verify` flag, this check may fail.
5050 - name : Install and Run Pre-commit
51- uses :
pre-commit/[email protected] .0 51+ uses :
pre-commit/[email protected] .1 5252
5353 build :
5454 needs : check-jobs-to-skip
5555 if : ${{ needs.check-jobs-to-skip.outputs.should_skip != 'true' }}
5656 runs-on : ubuntu-latest
57+ strategy :
58+ matrix :
59+ python-version : ["3.11", "3.12", "3.13"]
5760 defaults :
5861 run :
5962 shell : bash -l {0}
@@ -63,11 +66,11 @@ jobs:
6366 - name : Cache Conda
6467 uses : actions/cache@v3
6568 env :
66- CACHE_NUMBER : 0
69+ CACHE_NUMBER : 1 # Increment this to invalidate cache
6770 with :
6871 path : ~/conda_pkgs_dir
6972 key : ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
70- hashFiles('conda/dev.yml') }}
73+ hashFiles('conda/dev.yml') }}-python${{ matrix.python-version }}
7174
7275 - name : Build Conda Environment
7376 uses : conda-incubator/setup-miniconda@v3
7679 miniforge-variant : Miniforge3
7780 miniforge-version : latest
7881 environment-file : conda/dev.yml
79- channel-priority : strict
82+ channel-priority : flexible # Changed from strict to flexible
8083 auto-update-conda : true
84+ python-version : ${{ matrix.python-version }}
85+ channels : conda-forge
86+ use-only-tar-bz2 : true
87+
88+ - name : Verify Environment and Fix Dependencies
89+ run : |
90+ conda info
91+ conda list
92+ # Ensure we have the right Python version
93+ python --version
94+ # Fix pip issues for Python 3.12+
95+ if [[ "${{ matrix.python-version }}" == "3.12" ]] || [[ "${{ matrix.python-version }}" == "3.13" ]]; then
96+ python -m ensurepip --upgrade || true
97+ python -m pip install --upgrade --force-reinstall pip setuptools wheel
98+ fi
8199
82100 - if : ${{ needs.check-jobs-to-skip.outputs.should_skip != 'true' }}
83101 name : Show Conda Environment Info
87105 conda list
88106
89107 - name : Install `zppy` Package
90- run : pip install .
108+ run : python -m pip install .
91109
92110 # Does not run the integration tests, which require server access
93111 - name : Run Unit Tests
@@ -101,7 +119,7 @@ jobs:
101119 defaults :
102120 run :
103121 shell : bash -l {0}
104- timeout-minutes : 5
122+ timeout-minutes : 10 # Increased timeout for docs
105123 steps :
106124 - uses : actions/checkout@v2
107125 with :
@@ -111,11 +129,11 @@ jobs:
111129 - name : Cache Conda
112130 uses : actions/cache@v3
113131 env :
114- CACHE_NUMBER : 0
132+ CACHE_NUMBER : 1 # Match the build job cache number
115133 with :
116134 path : ~/conda_pkgs_dir
117135 key : ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
118- hashFiles('conda/dev.yml') }}
136+ hashFiles('conda/dev.yml') }}-docs
119137
120138 - name : Build Conda Environment
121139 uses : conda-incubator/setup-miniconda@v3
@@ -124,8 +142,9 @@ jobs:
124142 miniforge-variant : Miniforge3
125143 miniforge-version : latest
126144 environment-file : conda/dev.yml
127- channel-priority : strict
145+ channel-priority : flexible # Changed from strict to flexible
128146 auto-update-conda : true
147+ python-version : " 3.13" # Use stable Python version for docs
129148
130149 - if : ${{ needs.check-jobs-to-skip.outputs.should_skip != 'true' }}
131150 name : Show Conda Environment Info
0 commit comments