Codestyle and Linting #302
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
# This workflow will install Python dependencies, run tests, run linting, and test building docs | |
name: Codestyle and Linting | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: # For on demand runs | |
schedule: | |
- cron: 0 0 * * * # Scheduled run every day at midnight | |
jobs: | |
build: | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest] | |
python-version: [3.9] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.txt | |
- name: Lint Code with Black | |
run: | | |
black --check --diff lambda_function | |
- name: Lint Code with Flake | |
run: | | |
flake8 --count --max-line-length 88 lambda_function | |