mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 08:38:32 +02:00
* Get rid of `make` in favor of `poe` This moves the tasks that were previously in Makefile, into pyproject.toml (with all the other config) This is also more inclusive of Windows developers since they only need Python, and no longer have to install make separately. * update docs * don't make code blocks also links * implement tox for testing * update command to use new task runner
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: run jrnl tests
|
|
description: Runs all jrnl tests on multiple platforms
|
|
inputs:
|
|
cache-string:
|
|
description: 'Cache string secret. Change to bust the cache'
|
|
required: true
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- run: git config --global core.autocrlf false
|
|
shell: bash
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Capture full Python version in env
|
|
run: echo "PYTHON_FULL_VERSION=$(python --version)" >> $GITHUB_ENV
|
|
shell: bash
|
|
|
|
- name: poetry cache # Change CACHE_STRING secret to bust the cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: .venv
|
|
key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_FULL_VERSION }}-${{ inputs.cache-string }}
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
echo '::group::poetry'
|
|
pip --disable-pip-version-check install poetry
|
|
poetry config --local virtualenvs.in-project true
|
|
echo '::endgroup::'
|
|
|
|
echo '::group::Other dependencies'
|
|
poetry install --remove-untracked
|
|
echo '::endgroup::'
|
|
|
|
echo 'DEPS_INSTALLED=true' >> $GITHUB_ENV
|
|
shell: bash
|
|
|
|
- name: Linting
|
|
if: ${{ env.DEPS_INSTALLED == 'true' }}
|
|
run: poetry run poe ci-lint
|
|
shell: bash
|
|
|
|
- name: Testing
|
|
if: ${{ env.DEPS_INSTALLED == 'true' }}
|
|
run: poetry run poe ci-test
|
|
shell: bash
|