chore: Add GitHub Actions workflows for code formatting, testing, and CodeQL analysis #8
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: Code formatting and typing | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| CodeFormattingAndTyping: | |
| name: Code formatting and typing | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Git checkout | |
| uses: actions/checkout@v3 | |
| - name: Install Python 3 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements_dev.txt | |
| pip install types-PyMySQL types-PyYAML types-requests types-pytz | |
| - name: check format using pycodestyle (ignore error on line length>79) | |
| id: formatChecks | |
| run: flake8 ukbot | |
| - name: mypy static type checker | |
| run: mypy ukbot |