Skip to content

Commit

Permalink
feat(github): add dependabot and lint workflows
Browse files Browse the repository at this point in the history
feat: add pyright to dev requirements
  • Loading branch information
ToasterUwU committed Sep 23, 2023
1 parent 1cf2f84 commit dfcbcd7
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
53 changes: 53 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: lint

on:
push:
branches:
- master
pull_request:

jobs:
pyright:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
requirements.txt
requirements-dev.txt
- name: Install dependencies
run: python -m pip install -r requirements.txt -r requirements-dev.txt

- name: Set up pyright
run: echo "PYRIGHT_VERSION=$(python -c 'import pyright; print(pyright.__pyright_version__)')" >> $GITHUB_ENV

- name: Run pyright (Linux)
uses: jakebailey/pyright-action@v1.2.0
with:
version: ${{ env.PYRIGHT_VERSION }}
python-version: ${{ matrix.python-version }}
python-platform: Linux
no-comments: true
warnings: true

- name: Run pyright (Windows)
uses: jakebailey/pyright-action@v1.0.3
# run anyway
if: success() || failure()
with:
version: ${{ env.PYRIGHT_VERSION }}
python-version: ${{ matrix.python-version }}
python-platform: Windows
no-comments: true
warnings: true
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pyright == 1.1.327

0 comments on commit dfcbcd7

Please sign in to comment.