Merge pull request #417 from legendu-net/dependabot/pip/tqdm-4.66.3 #1296
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: Lint Code | |
| on: | |
| push: | |
| branches: [ dev, main ] | |
| pull_request: | |
| branches: [ dev ] | |
| jobs: | |
| lint_code: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: | |
| - "3.10" | |
| steps: | |
| - uses: actions/cache@v2 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| curl -sSL https://raw.githubusercontent.com/legendu-net/icon/main/install_icon.sh | sudo bash - | |
| icon pt -ic | |
| ~/.local/bin/poetry env use python3 | |
| ~/.local/bin/poetry install -E all | |
| - name: Lint with pylint | |
| run: | | |
| ~/.local/bin/poetry run pylint -E aiutil/ tests/ | |
| # - name: Lint with pytype | |
| # run: | | |
| # ~/.local/bin/poetry run pytype ./ | |
| - name: Check code format | |
| run: | | |
| ~/.local/bin/poetry run black --check ./ |