-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (70 loc) · 2.53 KB
/
tests.yml
File metadata and controls
84 lines (70 loc) · 2.53 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
concurrency:
group: tests-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unit-tests:
name: unit-tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
cache: pip
- name: Run Fast PR Gate
run: python -X utf8 scripts/run_pr_checks.py
full-checks:
name: full-checks
if: github.event_name != 'pull_request'
runs-on: windows-latest
defaults:
run:
shell: pwsh -l {0}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
cache: pip
- name: Install CI Dependencies
run: |
$ErrorActionPreference = 'Stop'
$PSNativeCommandUseErrorActionPreference = $true
python -m pip install --upgrade pip
python -m pip install -e . pytest pyyaml numpy scipy scikit-learn pillow tqdm absl-py
python -m pip install --index-url https://download.pytorch.org/whl/cpu torch torchvision torchaudio
- name: Public Surface Guard
run: |
$ErrorActionPreference = 'Stop'
$PSNativeCommandUseErrorActionPreference = $true
python scripts/run_docs_checks.py
- name: Verify CLI Install
run: |
$ErrorActionPreference = 'Stop'
$PSNativeCommandUseErrorActionPreference = $true
python -m diffaudit --help
diffaudit --help
python -m pip check
- name: Render Local Config Templates
run: |
$ErrorActionPreference = 'Stop'
$PSNativeCommandUseErrorActionPreference = $true
python scripts/render_team_local_configs.py --team-local configs/assets/team.local.template.yaml --output-dir tmp/configs/rendered-ci
- name: Run Core Tests
run: |
$ErrorActionPreference = 'Stop'
$PSNativeCommandUseErrorActionPreference = $true
python -m unittest tests.test_attack_registry tests.test_smoke_pipeline tests.test_audit_variation_query_contract tests.test_review_semantic_aux_low_fpr tests.test_review_recon_tail_confidence tests.test_midfreq_residual
python -m unittest tests.test_run_pr_checks
python -m pytest tests/test_variation_attack.py tests/test_render_team_local_configs.py -q