-
Notifications
You must be signed in to change notification settings - Fork 236
42 lines (37 loc) · 1.2 KB
/
validate-queries.yml
File metadata and controls
42 lines (37 loc) · 1.2 KB
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
name: Validate SQL Queries
on:
pull_request:
paths:
- 'docs/**/*.md' # Only trigger when documentation changes
- 'scripts/validate_*.py' # Or when validation scripts change
jobs:
validate-queries:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for git diff detection
- name: Debug filesystem
if: ${{ always() }}
run: |
echo "Workspace contents:"
ls -R
echo "Scripts directory:"
ls -la scripts/
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: pip install requests pyyaml
- name: Validate queries
env:
SUMO_LOGIC_ACCESS_ID: ${{ secrets.SUMO_LOGIC_ACCESS_ID }}
SUMO_LOGIC_ACCESS_KEY: ${{ secrets.SUMO_LOGIC_ACCESS_KEY }}
run: |
if [ -f "scripts/validate_queries.py" ]; then
python scripts/validate_queries.py
else
echo "::error file=.github/workflows/validate_queries.yml::Validation script not found at scripts/validate_queries.py"
exit 1
fi