mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-15 14:15:55 -06:00
chore(pre-commit): update pre-commit hooks
This commit is contained in:
parent
d2ffb689c3
commit
7edf30c964
3 changed files with 4 additions and 50 deletions
13
.github/workflows/build.yaml
vendored
13
.github/workflows/build.yaml
vendored
|
|
@ -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
|
||||
|
||||
|
|
|
|||
37
.github/workflows/lint.yaml
vendored
37
.github/workflows/lint.yaml
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue