-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (35 loc) · 1.3 KB
/
Copy pathvalidate-data.yml
File metadata and controls
38 lines (35 loc) · 1.3 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
name: validate-data
# Self-check: every PR runs the bundled lightweight validator. Heavy checks
# (coverage gaps, schema migrations, ingestion smoke tests) live in TechEngine.
on:
pull_request:
paths:
- "data/**"
- "app/validate.py"
push:
branches: [main, develop]
paths:
- "data/**"
- "app/validate.py"
jobs:
self-validate:
# Full scan of every record: only on pushes. PRs are covered by the scoped
# engine-validate below (changed records + their FK targets).
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Self-check (bundled validator)
run: python -m app.validate
engine-validate:
needs: self-validate
# self-validate is skipped on PRs; a skipped need must not skip this job.
if: ${{ !cancelled() && (needs.self-validate.result == 'success' || needs.self-validate.result == 'skipped') }}
uses: GetTechAPI/TechEngine/.github/workflows/validate-data.yml@main
with:
data-ref: ${{ github.event.pull_request.head.sha || github.sha }}
# PRs validate only the changed records; pushes to main/develop stay full.
base-sha: ${{ github.event.pull_request.base.sha || '' }}