-
Notifications
You must be signed in to change notification settings - Fork 45
54 lines (43 loc) · 1.43 KB
/
sanitize-runbook.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Sanitize Runbook
on:
pull_request:
types: [ opened, reopened, edited, ready_for_review ]
push:
env:
PR_NUMBER: ${{ github.event.number }}
jobs:
sanitize-runbooks:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d-%s')"
- name: Install system dependencies
run: |
pip install shyaml nbformat URLExtract
- name: All Runbooks
id: files
run: |
echo "all_runbook_files=$(find . -mindepth 2 -maxdepth 2 -name \*.ipynb | tr '\n' ' ')" >> $GITHUB_OUTPUT
- name: Run Sanitize
id: sanity
run: |
echo "Running sanitize script on ${{ steps.files.outputs.all_runbooks_files }}"
/usr/bin/env python ./sanitize.py -v ${{ steps.files.outputs.all_runbook_files }}
- name: Run Region Test
run: |
/usr/bin/env python ./region_test.py
- name: Checkout Repository
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Pytype Python Checker
uses: theahura/pytypes-action@main
with:
args: --generate-config pytype.toml
- name: Run Static Analysis on the Runbooks
run: |