Skip to content

ZH-252 - 1+MG DAC Recommendation Approval Process #59

ZH-252 - 1+MG DAC Recommendation Approval Process

ZH-252 - 1+MG DAC Recommendation Approval Process #59

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