55 strategy :
66 max-parallel : 4
77 matrix :
8- os : [macos-13]
9- python-version : [ 3.8, 3.9 ]
8+ # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
9+ # https://github.com/actions/runner-images/tree/main
10+ # ensure macos tag uses architecture identical to setup-python (x64 vs arm)
11+ os : [macos-15-intel]
12+ python-version : [ 3.9 ]
1013 fail-fast : false
1114 runs-on : ${{ matrix.os }}
1215 if : github.event.pull_request.draft == false
@@ -16,26 +19,31 @@ jobs:
1619 CP_MYSQL_TEST_USER : " root"
1720 CP_MYSQL_TEST_PASSWORD : " None"
1821 steps :
19- - uses : actions/checkout@v2
20- - name : Setup Python ${{ matrix.python-version }}
21- uses : actions/setup-python@v1
22+ - name : Checkout
23+ uses : actions/checkout@v4
24+ - name : Set up Python
25+ uses : actions/setup-python@v6
2226 with :
27+ # NOTE: if/when we move to a runner using apple M[1-3] (arm64)
28+ # architecture we'll need to adjust:
29+ # https://github.com/actions/setup-python/issues/108
2330 architecture : x64
2431 python-version : ${{ matrix.python-version }}
2532 - name : Get pip cache dir
2633 id : pip-cache-dir
2734 run : |
28- echo "::set-output name=dir:: $(pip cache dir)"
35+ echo "PIP_CACHE_DIR= $(pip cache dir)" >> "$GITHUB_OUTPUT "
2936 - name : Cache pip
30- uses : actions/cache@v3
37+ uses : actions/cache@v4
3138 id : cache-pip
3239 with :
33- path : ${{ steps.pip-cache-dir.outputs.dir }}
34- key : ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/setup.py ') }}
35- - name : Install java
36- uses : actions/setup-java@v1
40+ path : ${{ steps.pip-cache-dir.outputs.PIP_CACHE_DIR }}
41+ key : ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml ') }}
42+ - name : Install Java
43+ uses : actions/setup-java@v4
3744 with :
38- java-version : ' 14.0.1' # The JDK version to make available on the path.
45+ distribution : " temurin"
46+ java-version : " 11"
3947 java-package : jdk
4048 architecture : x64
4149 - name : Mac - Install and setup mysql
@@ -47,17 +55,18 @@ jobs:
4755 brew link mysql@8.0 --force
4856 mysql.server start
4957 mysql --host=$CP_MYSQL_TEST_HOST --user=$CP_MYSQL_TEST_USER --execute="CREATE DATABASE $CP_MYSQL_TEST_DB;" --skip-password
50- - name : Installation
58+ - name : Install CellProfiler
5159 run :
5260 |
5361 pip install pyinstaller
5462 pip install --upgrade pip setuptools wheel
5563 pip install "numpy>=1.20.1,<2" "Cython<3"
56- # git clone https://github.com/CellProfiler/CellProfiler.git ~/cellprofiler
5764 pip install -e .[test]
58- # pip install -e ~/cellprofiler
59- - name : Test
60- run : pytest -k 'not test_load_objects and not test_load_single_object'
65+ - name : Run Tests
66+ timeout-minutes : 10
67+ run : |
68+ # add -rP if you want to see debug for all tests, not just failed ones
69+ pytest -v --exitfirst --disable-warnings -o log_cli_level=10 --tb=long --show-capture=all --capture=sys --color=yes --code-highlight=yes --timeout=60 -k 'not test_load_objects and not test_load_single_object'
6170on :
6271 pull_request :
6372 types : [opened, reopened, synchronize, ready_for_review, review_requested]
0 commit comments