mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Add mac tests to Circle CI config (#1070)
This commit is contained in:
parent
f25b672a0e
commit
b2fc1dcce8
1 changed files with 75 additions and 3 deletions
|
@ -21,21 +21,28 @@ executors:
|
||||||
- image: cimg/python:3.9.0-browsers
|
- image: cimg/python:3.9.0-browsers
|
||||||
resource_class: small
|
resource_class: small
|
||||||
|
|
||||||
|
mac:
|
||||||
|
macos:
|
||||||
|
xcode: 12.1.0
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
|
|
||||||
get_poetry_deps:
|
get_poetry_deps:
|
||||||
steps:
|
steps:
|
||||||
- run:
|
- run:
|
||||||
name: Checking Python version
|
name: Checking Python version
|
||||||
command: python --version > /tmp/pythonversion
|
command: |
|
||||||
|
python --version
|
||||||
|
python --version > /tmp/pythonversion
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
key: 'deps-00-{{ checksum "poetry.lock" }}-{{ checksum "/tmp/pythonversion" }}'
|
key: deps-00-{{ checksum "poetry.lock" }}-{{ checksum "/tmp/pythonversion" }}-{{ arch }}
|
||||||
- run:
|
- run:
|
||||||
name: Installing dependencies
|
name: Installing dependencies
|
||||||
command: |
|
command: |
|
||||||
poetry config --local virtualenvs.in-project true
|
poetry config --local virtualenvs.in-project true
|
||||||
poetry install --no-root --remove-untracked
|
poetry install --no-root --remove-untracked
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: 'deps-00-{{ checksum "poetry.lock" }}-{{ checksum "/tmp/pythonversion" }}'
|
key: deps-00-{{ checksum "poetry.lock" }}-{{ checksum "/tmp/pythonversion" }}-{{ arch }}
|
||||||
paths:
|
paths:
|
||||||
- ~/project/.venv
|
- ~/project/.venv
|
||||||
|
|
||||||
|
@ -51,6 +58,37 @@ commands:
|
||||||
paths:
|
paths:
|
||||||
- ~/project/node_modules
|
- ~/project/node_modules
|
||||||
|
|
||||||
|
install_pyenv_poetry:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
name: Checking Python version
|
||||||
|
command: |
|
||||||
|
echo "python: $JRNL_PYTHON_VERSION"
|
||||||
|
echo "$JRNL_PYTHON_VERSION" > /tmp/pythonversion
|
||||||
|
- restore_cache:
|
||||||
|
key: pyenv-00-{{ checksum "/tmp/pythonversion" }}
|
||||||
|
- run:
|
||||||
|
name: Updating path
|
||||||
|
command: echo 'export PATH="$HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH"' >> $BASH_ENV
|
||||||
|
- run:
|
||||||
|
name: Installing Pyenv
|
||||||
|
command: |
|
||||||
|
if [[ ! -d ~/.pyenv ]]; then
|
||||||
|
curl https://pyenv.run | bash
|
||||||
|
fi
|
||||||
|
- run:
|
||||||
|
name: Installing Python
|
||||||
|
command: |
|
||||||
|
pyenv install -s $JRNL_PYTHON_VERSION
|
||||||
|
pyenv global $JRNL_PYTHON_VERSION
|
||||||
|
- run:
|
||||||
|
name: Installing Poetry
|
||||||
|
command: pip install poetry
|
||||||
|
- save_cache:
|
||||||
|
key: pyenv-00-{{ checksum "/tmp/pythonversion" }}
|
||||||
|
paths:
|
||||||
|
- ~/.pyenv
|
||||||
|
|
||||||
pytest:
|
pytest:
|
||||||
steps:
|
steps:
|
||||||
- run:
|
- run:
|
||||||
|
@ -103,6 +141,16 @@ aliases:
|
||||||
- behave
|
- behave
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: reports
|
path: reports
|
||||||
|
mac_test: &mac_test
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- install_pyenv_poetry
|
||||||
|
- get_poetry_deps
|
||||||
|
- run: poetry install
|
||||||
|
- pytest
|
||||||
|
- behave
|
||||||
|
- store_test_results:
|
||||||
|
path: reports
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test_37_linux:
|
test_37_linux:
|
||||||
|
@ -117,6 +165,24 @@ jobs:
|
||||||
executor: python39
|
executor: python39
|
||||||
<<: *linux_test
|
<<: *linux_test
|
||||||
|
|
||||||
|
test_37_mac:
|
||||||
|
executor: mac
|
||||||
|
environment:
|
||||||
|
JRNL_PYTHON_VERSION: 3.7.8
|
||||||
|
<<: *mac_test
|
||||||
|
|
||||||
|
test_38_mac:
|
||||||
|
executor: mac
|
||||||
|
environment:
|
||||||
|
JRNL_PYTHON_VERSION: 3.8.6
|
||||||
|
<<: *mac_test
|
||||||
|
|
||||||
|
test_39_mac:
|
||||||
|
executor: mac
|
||||||
|
environment:
|
||||||
|
JRNL_PYTHON_VERSION: 3.9.0
|
||||||
|
<<: *mac_test
|
||||||
|
|
||||||
linting:
|
linting:
|
||||||
executor: python39
|
executor: python39
|
||||||
steps:
|
steps:
|
||||||
|
@ -152,3 +218,9 @@ workflows:
|
||||||
name: Python 3.8 - Linux
|
name: Python 3.8 - Linux
|
||||||
- test_39_linux:
|
- test_39_linux:
|
||||||
name: Python 3.9 - Linux
|
name: Python 3.9 - Linux
|
||||||
|
- test_37_mac:
|
||||||
|
name: Python 3.7 - Mac
|
||||||
|
- test_38_mac:
|
||||||
|
name: Python 3.8 - Mac
|
||||||
|
- test_39_mac:
|
||||||
|
name: Python 3.9 - Mac
|
||||||
|
|
Loading…
Add table
Reference in a new issue