Skip to content

Commit

Permalink
Implement Tox for testing (#1504)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
wren authored Jun 18, 2022
1 parent bd59021 commit 7dccc46
Show file tree
Hide file tree
Showing 6 changed files with 209 additions and 104 deletions.
21 changes: 5 additions & 16 deletions .github/actions/run_tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,12 @@ runs:
echo 'DEPS_INSTALLED=true' >> $GITHUB_ENV
shell: bash

- name: Code formatting (Black)
- name: Linting
if: ${{ env.DEPS_INSTALLED == 'true' }}
run: |
poetry run black --version
poetry run black --check --diff .
run: poetry run poe ci-lint
shell: bash

- name: Code Style (flake8)
if: >
${{ env.DEPS_INSTALLED == 'true' }}
run: |
poetry run pflake8 --version
poetry run pflake8 jrnl tests
shell: bash

- name: Test with pytest
if: >
${{ env.DEPS_INSTALLED == 'true' }}
run: poetry run pytest --junitxml=reports/pytest/results.xml
- name: Testing
if: ${{ env.DEPS_INSTALLED == 'true' }}
run: poetry run poe ci-test
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
echo "node_modules/.bin" >> $GITHUB_PATH
- name: Start docs server
run: poetry run mkdocs serve &
run: poetry run poe docs &

- name: Generate sitemap
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ eggs/
lib64/
parts/
sdist/
.tox/
var/

# Versioning
Expand Down
Loading

0 comments on commit 7dccc46

Please sign in to comment.