Repository navigation
77 lines (74 loc) · 3.18 KB
/
Copy pathpurpose-separated-engine.yml
File metadata and controls
77 lines (74 loc) · 3.18 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
name: Purpose-separated Engine verification
on:
workflow_dispatch:
push:
branches: [main, implementation/purpose-separated-standards-engine]
pull_request:
branches: [main]
paths:
- 'tools/**'
- '.agents/skills/standards-engine/**'
- 'evaluation/standards-effectiveness/**'
- '*.md'
- 'workflows/**'
- 'topics/**'
- 'profiles/**'
- 'reference/**'
- 'prompts/**'
- 'templates/**'
- '.github/workflows/purpose-separated-engine.yml'
permissions:
contents: read
jobs:
engine:
runs-on: ubuntu-24.04
env:
PYTHONPATH: .
CANDIDATE_SHA: ${{ github.sha }}
SOURCE_REPOSITORY: ${{ github.repository }}
steps:
- name: Obtain exact public source without checkout credentials
shell: bash
run: |
set -euo pipefail
git init source
git -C source remote add origin "https://github.com/${SOURCE_REPOSITORY}.git"
git -C source fetch origin "$CANDIDATE_SHA"
git -C source checkout -b main FETCH_HEAD
test "$(git -C source rev-parse HEAD)" = "$CANDIDATE_SHA"
git -C source bundle create ../source.bundle HEAD
- name: Retain exact source for implementation and review
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: engine-source-${{ github.sha }}
path: source.bundle
if-no-files-found: error
retention-days: 7
- name: Install the locked Engine environment
working-directory: source
shell: bash
run: |
set -euo pipefail
python3 -c 'import sys; assert sys.version_info[:2] == (3, 12), sys.version'
python3 -m venv "$RUNNER_TEMP/engine-env"
"$RUNNER_TEMP/engine-env/bin/python" -m pip install --require-hashes --only-binary=:all: -r tools/standards_contracts/requirements.lock
- name: Verify implementation and registered structure
working-directory: source
shell: bash
run: |
set -euo pipefail
python="$RUNNER_TEMP/engine-env/bin/python"
"$python" -m unittest discover -s tools/standards_identity/tests
"$python" -m unittest discover -s tools/standards_applicability/tests
"$python" -m unittest discover -s tools/graph_engine/tests
"$python" -m unittest discover -s tools/standards_graph/tests
"$python" -m unittest discover -s tools/standards_snapshots/tests
"$python" -m unittest discover -s tools/repository_git/tests
"$python" -m unittest discover -s tools/review_evidence/tests
"$python" -m unittest discover -s tools/standards_metadata/tests
"$python" -m unittest discover -s tools/standards_policy_impact/tests
"$python" -m unittest discover -s tools/standards_contracts/tests
"$python" -m unittest discover -s tools/standards_analysis/tests
PYTHONPATH=.:tools/standards_verifier "$python" -m unittest discover -s tools/standards_verifier/tests
"$python" -m unittest discover -s tools/standards_engine/tests
PYTHONPATH=.:tools/standards_verifier "$python" tools/standards_verifier/verify.py --complete