small patch #127
Workflow file for this run
This file contains hidden or 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: Format & Lint | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
format-and-lint: | |
if: github.repository == 'CentML/flexible-inference-bench' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
- name: Format with black | |
run: | | |
# stop the build if format is not correct | |
echo "Running with " $(pip freeze | grep "black") | |
bash scripts/lint/format.sh --check | |
- name: Lint with pylint | |
run: | | |
echo "Running with" $(pip freeze | grep "pylint") | |
bash scripts/lint/lint.sh | |
- name: Type checking with mypy | |
run: | | |
echo "Running with" $(pip freeze | grep "mypy") | |
bash scripts/lint/mypy.sh |