-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (51 loc) · 1.88 KB
/
Copy pathci.yml
File metadata and controls
59 lines (51 loc) · 1.88 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
name: CI
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
env:
# Pin hash seed so tests that guard against hash()-based seeding are
# deterministic and correctly distinguish hash() from hashlib.md5.
PYTHONHASHSEED: "0"
jobs:
test:
name: pytest (Python 3.11)
runs-on: ubuntu-latest
steps:
- name: Checkout aedt-mspe-experiments
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Clone upstream toolkit (aedt-fairness-audit) at pinned SHA
run: |
PINNED_SHA="0951db99e3385fd235bd12fe5ba411251f4eba40"
git clone https://github.com/chadmarkey/aedt-fairness-audit.git "$HOME/aedt-fairness-audit"
git -C "$HOME/aedt-fairness-audit" fetch --depth 1 origin "$PINNED_SHA"
git -C "$HOME/aedt-fairness-audit" checkout "$PINNED_SHA"
# Verify the SHA actually landed where we expect (defensive).
ACTUAL_SHA=$(git -C "$HOME/aedt-fairness-audit" rev-parse HEAD)
if [ "$ACTUAL_SHA" != "$PINNED_SHA" ]; then
echo "ERROR: toolkit checkout is at $ACTUAL_SHA, expected $PINNED_SHA" >&2
exit 1
fi
echo "Upstream toolkit pinned at $PINNED_SHA"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install \
numpy \
pandas \
scipy \
scikit-learn \
matplotlib \
pytest
# scikit-learn is required because the upstream toolkit's
# audit/metrics.py imports sklearn.linear_model.LogisticRegression.
# sentence-transformers is intentionally excluded — tests run offline
# and do not require SBERT model downloads.
- name: Run tests
run: |
pytest tests/ -v --tb=short