Organize learning materials #18
Workflow file for this run
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: Code Style | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: "Lint Code Base" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
# super-linter needs the full git history to get the | |
# list of files that changed across commits | |
fetch-depth: 0 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
# change this to a version matrix | |
python-version: '3.10' | |
- name: Install and configure Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.8.3 | |
virtualenvs-create: true | |
- name: Install dependencies | |
run: | | |
poetry install --only dev --no-root --no-interaction | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
poetry run flake8 . --count --max-complexity=10 --max-line-length=88 --statistics | |
- name: Check with black | |
run: | | |
poetry run black . --check --diff | |
- name: Run GitHub super-linter | |
uses: super-linter/super-linter/slim@v6 | |
env: | |
DEFAULT_BRANCH: main | |
# To report GitHub Actions status checks | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
VALIDATE_ALL_CODEBASE: true | |
VALIDATE_YAML: true | |
VALIDATE_JSON: true | |
VALIDATE_MD: true | |
VALIDATE_BASH: true | |
VALIDATE_DOCKER: true | |
VALIDATE_ENV: true |