Adding sanity test #2
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 SDK | |
| on: | |
| pull_request: | |
| paths: | |
| - 'graphiant_sdk/**' | |
| - 'test/**' | |
| - '.github/workflows/lint.yml' | |
| - 'requirements.txt' | |
| - 'test-requirements.txt' | |
| - 'pyproject.toml' | |
| - 'setup.py' | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| paths: | |
| - 'graphiant_sdk/**' | |
| - 'test/**' | |
| - '.github/workflows/lint.yml' | |
| - 'requirements.txt' | |
| - 'test-requirements.txt' | |
| - 'pyproject.toml' | |
| - 'setup.py' | |
| jobs: | |
| flake8: | |
| name: Flake8 Linting | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install -r test-requirements.txt | |
| - name: Run flake8 | |
| run: | | |
| flake8 graphiant_sdk/ --count --select=E9,F63,F7,F82 --show-source --statistics | |
| flake8 graphiant_sdk/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
| mypy: | |
| name: MyPy Type Checking | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install -r test-requirements.txt | |
| - name: Run mypy | |
| run: | | |
| mypy graphiant_sdk/ |