diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index b596fc6..5ad6f8c 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -1,52 +1,39 @@ name: integration -on: [push, pull_request] +on: [push, pull_request, workflow_dispatch] jobs: - checks: + tests: runs-on: ubuntu-latest strategy: max-parallel: 8 - matrix: - check: [bluecheck, doc8, docs, flake8, isortcheck, mypy, pylint, rstcheck] steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 + - name: Set up Python 3.11 x64 + uses: actions/setup-python@v5 with: python-version: '3.11' - - name: Install dependencies - run: | - pip install --upgrade pip - pip install tox - - name: Run checks with tox - run: | - tox -e ${{ matrix.check }} - - tests: - needs: checks - runs-on: ${{ matrix.os }} - strategy: - max-parallel: 8 - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: [3.8, 3.9, '3.10', 3.11] - - steps: - - name: Set up Python ${{ matrix.python-version }} x64 - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} architecture: x64 - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - name: Install tox + - name: Install deps run: | pip install --upgrade pip - pip install tox + pip install -r requirements-dev.txt + echo "DJANGO_SETTINGS_MODULE=tests.settings" > $GITHUB_ENV + echo "PYTHONPATH=." >> $GITHUB_ENV + + - name: Instrument code + uses: AryazE/auto-dylin/instrument@main + with: + analysis-coverage: false - - name: Test with tox - run: tox -e py + - name: Test + run: | + pytest tests + + - name: Report results + uses: AryazE/auto-dylin/report@main + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 33b3a8f..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: release - -on: - push: - tags: - - v* - -jobs: - - upload: - runs-on: ubuntu-latest - permissions: - id-token: write - - steps: - - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.11' - - - name: Install build - run: pip install build - - - name: Create build - run: python -m build - - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/tox.ini b/tox.ini deleted file mode 100644 index e7217a7..0000000 --- a/tox.ini +++ /dev/null @@ -1,101 +0,0 @@ -[tox] -envlist=bluecheck,doc8,docs,isortcheck,flake8,mypy,pylint,rstcheck,py38,py39,py310,py311 -skip_missing_interpreters=True - -[testenv] -commands=pytest -deps= - django==4.2.* - pytest - pytest-cov - pytest-django - pytest-xdist -setenv= - DJANGO_SETTINGS_MODULE=tests.settings - PYTHONPATH={toxinidir} - -[testenv:blue] -commands=blue {toxinidir}/setup.py {toxinidir}/diskcache {toxinidir}/tests -deps=blue - -[testenv:bluecheck] -commands=blue --check {toxinidir}/setup.py {toxinidir}/diskcache {toxinidir}/tests -deps=blue - -[testenv:doc8] -commands=doc8 docs --ignore-path docs/_build -deps=doc8 - -[testenv:docs] -allowlist_externals=make -changedir=docs -commands=make html -deps= - django==4.2.* - sphinx - -[testenv:flake8] -commands=flake8 {toxinidir}/setup.py {toxinidir}/diskcache {toxinidir}/tests -deps=flake8 - -[testenv:isort] -commands=isort {toxinidir}/setup.py {toxinidir}/diskcache {toxinidir}/tests -deps=isort - -[testenv:isortcheck] -commands=isort --check {toxinidir}/setup.py {toxinidir}/diskcache {toxinidir}/tests -deps=isort - -[testenv:mypy] -commands=mypy {toxinidir}/diskcache -deps=mypy - -[testenv:pylint] -commands=pylint {toxinidir}/diskcache -deps= - django==4.2.* - pylint - -[testenv:rstcheck] -commands=rstcheck {toxinidir}/README.rst -deps=rstcheck - -[testenv:uploaddocs] -allowlist_externals=rsync -changedir=docs -commands= - rsync --rsync-path 'sudo -u herokuish rsync' -azP --stats --delete \ - _build/html/ \ - grantjenks:/srv/www/grantjenks.com/public/docs/diskcache/ - -[isort] -multi_line_output = 3 -include_trailing_comma = True -force_grid_wrap = 0 -use_parentheses = True -ensure_newline_before_comments = True -line_length = 79 - -[pytest] -addopts= - -n auto - --cov-branch - --cov-fail-under=98 - --cov-report=term-missing - --cov=diskcache - --doctest-glob="*.rst" - --ignore docs/case-study-web-crawler.rst - --ignore docs/sf-python-2017-meetup-talk.rst - --ignore tests/benchmark_core.py - --ignore tests/benchmark_djangocache.py - --ignore tests/benchmark_glob.py - --ignore tests/issue_85.py - --ignore tests/plot.py - -[doc8] -# ignore=D000 - -[flake8] -exclude=tests/test_djangocache.py -extend-ignore=E203 -max-line-length=120