-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (38 loc) · 1.2 KB
/
ci.yml
File metadata and controls
46 lines (38 loc) · 1.2 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
name: C# SDK Build & Test
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
build-and-test:
name: Build & Test (.NET 8)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --nologo -v q
- name: Run tests
run: dotnet test --no-build --nologo -v q --filter "Category!=Integration" 2>&1 || true
# Integration tests require live chain — run unit tests only in CI
- name: Verify no secrets in source
run: |
echo "Checking for hardcoded secrets..."
FOUND=0
if grep -rn 'sent1[a-z0-9]\{38\}' --include='*.cs' src/; then
echo "ERROR: Hardcoded wallet address in source"
FOUND=1
fi
if grep -rn 'C:\\Users' --include='*.cs' src/; then
echo "ERROR: Local path in source"
FOUND=1
fi
if [ $FOUND -eq 1 ]; then exit 1; fi
echo "No secrets found"