Linting initiated after xames3's actions #12
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
# TOPSTSCHOOL Sphinx (Documentation) Document & Code Linting Workflow | |
# ================================================================== | |
# | |
# Author: Akshay Mestry <[email protected]> | |
# Created on: Sunday, October 27 2024 | |
# Last updated on: Thursday, October 31 2024 | |
name: linting | |
run-name: Linting initiated after ${{ github.actor }}'s actions | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- 'docs/**' | |
- 'requirements*' | |
permissions: | |
contents: read | |
env: | |
SOURCEDIR: docs/source | |
PYTHONVERSION: 3.12.1 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
name: linting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 | |
- name: Setup | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHONVERSION }} | |
cache: pip | |
- name: Analyze | |
id: linting | |
run: | | |
python -m pip install -Uq pip -rrequirements-dev.txt | |
echo "Checking code for issues..." | |
flake8 ${{ env.SOURCEDIR }} && sphinx-lint ${{ env.SOURCEDIR }} |