Skip to content

Commit

Permalink
simplify tests pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-mixas committed Dec 2, 2024
1 parent 436fbca commit 0f4fed5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 47 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ jobs:
- 'pypy-3.8'
- 'pypy-3.9'
- 'pypy-3.10'
tox-env: ['essential']
tests: essential
include:
- os: macos-latest
python-version: '3.12'
tox-env: essential
tests: essential
- os: windows-latest
python-version: '3.11'
tox-env: essential
tests: essential
- os: ubuntu-latest
python-version: '3.10'
tox-env: extended
tests: extended
steps:
- uses: actions/checkout@v4

Expand All @@ -35,20 +35,21 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install dependencies
run: |
pip install --quiet --upgrade tox>=4.5.1
- name: Run essential tests
if: ${{ matrix.tox-env != 'extended' }}
if: ${{ matrix.tests != 'extended' }}
run: |
tox run -e ${{ matrix.tox-env }}
pip install --quiet -e '.[cli,test]'
pytest
- name: Run linters and coverage
if: ${{ matrix.tox-env == 'extended' }}
- name: Run extra linters and report coverage
if: ${{ matrix.tests == 'extended' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYTHONHASHSEED: '1'
run: |
pip install --quiet -e '.[cli,test,lint]'
pytest --doctest-modules
python -m doctest HOWTO.md README.md
darglint --docstring-style google --strictness short nested_diff
pip install --quiet --upgrade coveralls
tox run -e ${{ matrix.tox-env }}
coveralls --service=github
4 changes: 2 additions & 2 deletions tests/data/gen_standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def format_test(**kwargs):
}},""".format(**kwargs)


def generate_tests(source_dir=sys.argv[1]):
def generate_tests(source_dir):
tests = []
for file_name in sorted(os.listdir(source_dir)):
with open(os.path.join(source_dir, file_name)) as f:
Expand Down Expand Up @@ -66,4 +66,4 @@ def get_tests():


if __name__ == '__main__':
generate_tests()
generate_tests(sys.argv[1])
32 changes: 0 additions & 32 deletions tox.ini

This file was deleted.

0 comments on commit 0f4fed5

Please sign in to comment.