diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d4a4662b..69a6215a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -36,7 +36,7 @@ permissions: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest if: github.repository == 'XuehaiPan/nvitop' timeout-minutes: 30 steps: @@ -53,17 +53,6 @@ jobs: python-version: "3.7 - 3.13" update-environment: true - - name: Set up Python 3.7 - id: py37 - uses: actions/setup-python@v5 - with: - python-version: "3.7" - update-environment: false - - - name: Check syntax (Python 3.7) - run: | - "${{ steps.py37.outputs.python-path }}" -m compileall nvitop - - name: Upgrade build dependencies run: python -m pip install --upgrade pip setuptools wheel build diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index a94462f9..c2f4bb63 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -15,7 +15,7 @@ permissions: jobs: lint: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest timeout-minutes: 30 steps: - name: Checkout @@ -30,21 +30,6 @@ jobs: python-version: "3.7 - 3.13" update-environment: true - - name: Set up Python 3.7 - id: py37 - uses: actions/setup-python@v5 - with: - python-version: "3.7" - update-environment: false - - - name: Check syntax (Python 3.7) - run: | - "${{ steps.py37.outputs.python-path }}" -m compileall nvitop - ( - cd nvitop-exporter && - "${{ steps.py37.outputs.python-path }}" -m compileall nvitop_exporter - ) - - name: Upgrade pip run: | python -m pip install --upgrade pip setuptools @@ -61,16 +46,6 @@ jobs: python -m nvitop.select --version python -m nvitop.select --help - - name: Import tests (Python 3.7) - run: | - "${{ steps.py37.outputs.python-path }}" -m pip install --upgrade pip setuptools - "${{ steps.py37.outputs.python-path }}" -m pip install -r requirements.txt - "${{ steps.py37.outputs.python-path }}" -c 'import nvitop' - "${{ steps.py37.outputs.python-path }}" -m nvitop --version - "${{ steps.py37.outputs.python-path }}" -m nvitop --help - "${{ steps.py37.outputs.python-path }}" -m nvitop.select --version - "${{ steps.py37.outputs.python-path }}" -m nvitop.select --help - - name: Install dependencies for nvitop-exporter run: | python -m pip install -r nvitop-exporter/requirements.txt @@ -84,16 +59,6 @@ jobs: python -m nvitop_exporter --help ) - - name: Import tests for nvitop-exporter (Python 3.7) - run: | - ( - cd nvitop-exporter && - "${{ steps.py37.outputs.python-path }}" -m pip install -r requirements.txt && - "${{ steps.py37.outputs.python-path }}" -c 'import nvitop_exporter' && - "${{ steps.py37.outputs.python-path }}" -m nvitop_exporter --version && - "${{ steps.py37.outputs.python-path }}" -m nvitop_exporter --help - ) - - name: Install linters run: | python -m pip install --upgrade pre-commit pylint[spelling] mypy typing-extensions diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 075ba8b6..c922d2d2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: - id: debug-statements - id: double-quote-string-fixer - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.3 + rev: v0.8.4 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -34,7 +34,7 @@ repos: hooks: - id: black - repo: https://github.com/asottile/pyupgrade - rev: v3.19.0 + rev: v3.19.1 hooks: - id: pyupgrade args: [--py37-plus] # sync with requires-python