Skip to content

ZH-351 - Improved automatic linting and updated existing SOPs #72

ZH-351 - Improved automatic linting and updated existing SOPs

ZH-351 - Improved automatic linting and updated existing SOPs #72

Workflow file for this run

---
# This workflow lints the SOPs within the 'sops/' directory.
# The logic of this workflow is:
# - Details: ZH-268
# - Why: helps maintain consistency of SOPs, both in format and content
# - Would block the PR if failed? If the mode is not strict, all errors
# should be addressed before merging with 'main'
# - How: calls the linter class 'SOPLinter' within 'sop_linter.py'
name: |
[REQUIRED] Linter of SOPs
on:
pull_request:
branches:
- main
- dev
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install dependencies
run: |
pip install --upgrade pip
requirements_f="./requirements.txt"
if [ -f "$requirements_f" ]; then pip install -r "$requirements_f" --verbose; fi
- name: Run SOP linter
# The linter exit codes will determine whether this workflow finishes or not
run: |
python scripts/sop_linter.py sops/european-level sops/node-specific -v 1