diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cf3b95ad21..d813a2a110 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,22 +22,6 @@ env: default-python: "3.12" jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ env.default-python }} - uses: actions/setup-python@v4 - with: - python-version: ${{ env.default-python }} - - name: Upgrade pip, Install nox - run: | - python -m pip install --upgrade pip - python -m pip install nox - - name: Lint - run: | - nox --error-on-missing-interpreters --non-interactive --session lint - tests: runs-on: ${{ matrix.os }} strategy: @@ -82,7 +66,7 @@ jobs: pypi-publish: name: Publish pipx to PyPI on release if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - needs: [lint, tests] + needs: [tests] runs-on: ubuntu-latest steps: - name: Checkout ${{ github.ref }} @@ -107,7 +91,7 @@ jobs: build-zipapp: name: Build zipapp if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - needs: [lint, tests] + needs: [tests] runs-on: ubuntu-latest steps: - name: Checkout ${{ github.ref }} diff --git a/noxfile.py b/noxfile.py index ab2d89e742..dd39101262 100644 --- a/noxfile.py +++ b/noxfile.py @@ -146,17 +146,8 @@ def cover(session): @nox.session(python=PYTHON_DEFAULT_VERSION) def lint(session): session.run("python", "-m", "pip", "install", "--upgrade", "pip") - session.install(*LINT_DEPENDENCIES) - files = [str(Path("src") / "pipx"), "tests", "scripts"] + [str(p) for p in Path(".").glob("*.py")] - session.run("ruff", *files) - session.run( - "mypy", - "--strict-equality", - "--no-implicit-optional", - "--warn-unused-ignores", - "--check-untyped-defs", - *files, - ) + session.run("python", "-m", "pip", "install", "pre-commit") + session.run("pre-commit", "run", "--all-files") @nox.session(python=PYTHON_ALL_VERSIONS)