Add bot code #1
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: | |
branches: | |
- main | |
jobs: | |
Analyze: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
version: [3.9, '3.10', '3.11'] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.version }} | |
id: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.version }} | |
- name: Set up Poetry | |
uses: Gr1N/setup-poetry@v8 | |
- name: Cache Poetry | |
id: cache-poetry | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: ${{ runner.os }}-poetry-lint-${{ matrix.version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install Poetry Dependencies | |
if: steps.cache-poetry.outputs.cache-hit != 'true' | |
run: | | |
poetry install --with dev | |
- name: Run Pyright | |
run: | | |
poetry run pyright bot | |
- name: Run Ruff | |
run: | | |
poetry run ruff bot |