Repository navigation
127 lines (121 loc) · 4.34 KB
/
Copy pathtest.yml
File metadata and controls
127 lines (121 loc) · 4.34 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: Automated financial regressions
on:
push:
workflow_dispatch:
inputs:
e2e_profile:
description: Positive scenario coverage
type: choice
options: [ci, full]
default: ci
concurrency:
group: gofin-regressions-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Formatting and Clippy
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: '1.97.1'
components: rustfmt, clippy
- name: Cache Rust build artifacts
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
shared-key: financial-regressions
cache-on-failure: true
- run: cargo fmt --all -- --check
- run: cargo clippy --locked --workspace --all-targets -- -D warnings
tests:
name: Critical security negatives
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: '1.97.1'
- name: Cache Rust build artifacts
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target/debug
!target/debug/incremental
# Refresh successful workspace/dependency artifacts per revision;
# fall back only to the same security toolchain and manifests.
key: security-test-binaries-v1-${{ runner.os }}-${{ runner.arch }}-rust-1.97.1-${{ hashFiles('**/Cargo.toml', 'Cargo.lock', '.cargo/config.toml', 'rust-toolchain*') }}-${{ github.sha }}
restore-keys: |
security-test-binaries-v1-${{ runner.os }}-${{ runner.arch }}-rust-1.97.1-${{ hashFiles('**/Cargo.toml', 'Cargo.lock', '.cargo/config.toml', 'rust-toolchain*') }}-
- name: Verify security runner coverage and build isolation
run: python3 scripts/test-security-runner.py
- name: Run explicitly retained security-negative tests
run: make test-security
- name: Verify Rust-to-native approval contracts
run: make test-native-approval
- name: Preserve security test evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: critical-security-negatives
path: .context/test-runs/security-*/
if-no-files-found: error
lifecycle:
name: Lifecycle and delivery
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Synthetic release delivery tests
run: make test-delivery
- name: Synthetic installer, update, uninstall and development lifecycle
run: |
python3 scripts/test-rust-macos-installer.py
python3 scripts/test-rust-macos-runtime-update.py
python3 scripts/test-rust-macos-uninstall.py
python3 scripts/test-dev-workflow.py
python3 scripts/test-ci-e2e-reuse.py
python3 scripts/test-e2e-outcome-evidence.py
python3 scripts/test-e2e-profiles.py
python3 scripts/test-surfpool-installer.py
python3 scripts/test-meteora-native-loading.py
native:
name: Native Swift checks
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: sh native/build.sh
e2e_lookup:
name: Find reusable E2E evidence
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
outputs:
run_id: ${{ steps.evidence.outputs.run_id }}
steps:
- uses: actions/checkout@v4
- name: Check successful runs for the exact merged tree
id: evidence
env:
GH_TOKEN: ${{ github.token }}
run: python3 scripts/ci-e2e-reuse.py
e2e:
needs: e2e_lookup
if: ${{ !cancelled() && (needs.e2e_lookup.result != 'success' || needs.e2e_lookup.outputs.run_id == '') }}
uses: ./.github/workflows/e2e.yml
with:
profile: ${{ github.event_name == 'workflow_dispatch' && inputs.e2e_profile || 'ci' }}
rust:
# Keep the required-check name. Only verified E2E reuse permits a skip.
name: rust (macos-latest)
needs: [lint, tests, lifecycle, native, e2e_lookup, e2e]
if: always()
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Require every regression job
env:
NEEDS: ${{ toJSON(needs) }}
run: python3 scripts/ci-e2e-reuse.py --check-gate