diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..b7b9170 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,41 @@ +name: lint + +on: + push: + branches: + - '*' + pull_request: + branches: + - '*' + +jobs: + lint: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3' + + 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 + # uses: chartboost/ruff-action@v1 + run: ruff check --format=github . + + - name: format using black + run: | + black -S --check --diff . + + - name: type-check using mypy + run: | + mypy .