Update 4.2.x branch #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: run-core-tests | |
jobs: | |
test: | |
name: Install and test Core | |
strategy: | |
max-parallel: 4 | |
matrix: | |
os: [macos-11] | |
python-version: [ 3.8, 3.9 ] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
if: github.event.pull_request.draft == false | |
env: | |
CP_MYSQL_TEST_HOST: "127.0.0.1" | |
CP_MYSQL_TEST_DB: "cellprofiler_test" | |
CP_MYSQL_TEST_USER: "root" | |
CP_MYSQL_TEST_PASSWORD: "None" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
architecture: x64 | |
python-version: ${{ matrix.python-version }} | |
- name: Get pip cache dir | |
id: pip-cache-dir | |
run: | | |
echo "::set-output name=dir::$(pip cache dir)" | |
- name: Cache pip | |
uses: actions/cache@v3 | |
id: cache-pip | |
with: | |
path: ${{ steps.pip-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/setup.py') }} | |
- name: Install java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '14.0.1' # The JDK version to make available on the path. | |
java-package: jdk | |
architecture: x64 | |
- name: Mac - Install and setup mysql | |
if: startsWith(matrix.os, 'macos') | |
env: | |
LC_ALL: "en_US.UTF-8" | |
run: | | |
brew install mysql | |
mysql.server start | |
mysql --host=$CP_MYSQL_TEST_HOST --user=$CP_MYSQL_TEST_USER --execute="CREATE DATABASE $CP_MYSQL_TEST_DB;" --skip-password | |
- name: Installation | |
run: | |
| | |
pip install pyinstaller | |
pip install --upgrade pip setuptools wheel | |
pip install numpy>=1.20.1 | |
# git clone https://github.com/CellProfiler/CellProfiler.git ~/cellprofiler | |
pip install -e .[test] | |
# pip install -e ~/cellprofiler | |
- name: Test | |
run: pytest -k 'not test_load_objects and not test_load_single_object' | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize, ready_for_review, review_requested] | |
push: | |
branches: | |
- 'master' | |
workflow_dispatch: | |