-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6619210
commit 1166679
Showing
2 changed files
with
14 additions
and
64 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,35 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Tests | ||
name: Tests with tox | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'examples/**' | ||
- 'docs/**' | ||
- 'README.md' | ||
- 'LICENSE' | ||
- '.gitignore' | ||
|
||
paths: | ||
- "folktexts/**" | ||
- "tests/**" | ||
- "requirements/**" | ||
- "pyproject.toml" | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "folktexts/**" | ||
- "tests/**" | ||
- "requirements/**" | ||
- "pyproject.toml" | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install ".[tests]" | ||
# ^ install local package with extra test dependencies | ||
- name: Lint with flake8 | ||
continue-on-error: true | ||
run: | | ||
flake8 folktexts tests --count --statistics | ||
- name: Test with pytest | ||
run: | | ||
coverage run -m pytest tests && coverage report -m | ||
# TODO: $ coverage run -m pytest tests && coverage report -m --fail-under=75 | ||
python -m pip install tox tox-gh-actions | ||
- name: Test with tox | ||
run: tox |