restructure Dockerfiles; CI: lint, validate, build & publish #10
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: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
# make workflow "callable" by others | |
workflow_call: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: | |
- '3' | |
- '3.8' # used by some NVBW infrastructure | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: setup Python v${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: pip install | |
run: pip install -r requirements.txt -r requirements-dev.txt | |
- name: lint using ruff | |
# We could also use the official GitHub Actions integration. | |
# https://beta.ruff.rs/docs/usage/#github-action | |
# uses: chartboost/ruff-action@v1 | |
run: ruff check --format=github . | |
- name: format using black | |
# We could also use the official GitHub Actions integration. | |
# https://black.readthedocs.io/en/stable/integrations/github_actions.html | |
# uses: uses: psf/black@stable | |
run: | | |
black -S --check --diff . | |
- name: type-check using mypy | |
run: | | |
mypy . |