-
Notifications
You must be signed in to change notification settings - Fork 5
40 lines (34 loc) · 1.1 KB
/
lint_sops.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
# 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