Publish CI validation workflow
Browse files
.github/workflows/validate.yml
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: validate
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches: [main]
|
| 6 |
+
pull_request:
|
| 7 |
+
workflow_dispatch:
|
| 8 |
+
|
| 9 |
+
permissions:
|
| 10 |
+
contents: read
|
| 11 |
+
|
| 12 |
+
jobs:
|
| 13 |
+
static-and-unit:
|
| 14 |
+
runs-on: ubuntu-latest
|
| 15 |
+
steps:
|
| 16 |
+
- uses: actions/checkout@v4
|
| 17 |
+
- uses: actions/setup-python@v5
|
| 18 |
+
with:
|
| 19 |
+
python-version: "3.12"
|
| 20 |
+
cache: pip
|
| 21 |
+
- name: Install validation dependency
|
| 22 |
+
run: python -m pip install -r requirements-dev.txt
|
| 23 |
+
- name: Run unit tests
|
| 24 |
+
run: python -m unittest discover -s tests -v
|
| 25 |
+
- name: Run static policy validation
|
| 26 |
+
run: python validate.py
|
| 27 |
+
- name: Compile Python sources
|
| 28 |
+
run: python -m compileall -q lab.py validate.py soc_copilot tests tools
|