fix(callbacks/lightning): populate callback for lightning
#509
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.ref }}" | |
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
permissions: | |
contents: read | |
jobs: | |
lint: | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up Python | |
id: py | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.7 - 3.12" | |
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 | |
- name: Install dependencies | |
run: | | |
python -m pip install -r requirements.txt | |
- name: Import tests | |
run: | | |
python -c 'import nvitop' | |
python -m nvitop --version | |
python -m nvitop --help | |
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 | |
- name: Import tests for nvitop-exporter | |
run: | | |
( | |
cd nvitop-exporter && | |
python -c 'import nvitop_exporter' && | |
python -m nvitop_exporter --version && | |
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 | |
- name: pre-commit | |
run: | | |
python -m pre_commit --version | |
python -m pre_commit install --install-hooks | |
python -m pre_commit run --all-files |