-
Notifications
You must be signed in to change notification settings - Fork 60
58 lines (51 loc) · 1.64 KB
/
validate-package-files.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
55
56
57
58
name: Validate Package Files
on:
merge_group:
pull_request:
branches:
- main
- next
- "rc/**"
jobs:
validate-package-files:
strategy:
matrix:
language: [cpp, c]
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ inputs.ref }}
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install CodeQL
run: |
VERSION="v$( jq -r '.supported_environment | .[0] | .codeql_cli' supported_codeql_configs.json)"
gh extensions install github/gh-codeql
gh codeql set-version "$VERSION"
gh codeql install-stub
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Install generate_package_files.py dependencies
run: pip install -r scripts/requirements.txt
- name: Validate Package Descriptions
env:
LANGUAGE: ${{ matrix.language }}
run: |
python scripts/validate-rule-package.py rule_packages/$LANGUAGE/*.json
- name: Validate Package Descriptions consistency
env:
LANGUAGE: ${{ matrix.language }}
run: |
python scripts/verify_rule_package_consistency.py $LANGUAGE
- name: Validate Current versus Expected Package Files
env:
LANGUAGE: ${{ matrix.language }}
run: |
find rule_packages/$LANGUAGE -name \*.json -exec basename {} .json \; | xargs python scripts/generate_rules/generate_package_files.py $LANGUAGE
git diff
git diff --compact-summary
git diff --quiet