Skip to content

Commit

Permalink
chore(pre-commit): update pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
XuehaiPan committed Dec 19, 2024
1 parent d2ffb68 commit 7edf30c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 50 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down
37 changes: 1 addition & 36 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions:

jobs:
lint:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
Expand Down

0 comments on commit 7edf30c

Please sign in to comment.