-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (81 loc) · 2.78 KB
/
ci.yml
File metadata and controls
95 lines (81 loc) · 2.78 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
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
csharp:
name: C# build + tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Restore
run: dotnet restore src/csharp/FlashAlpha.QuantConnect.sln
- name: Build (Release, treat warnings as errors)
run: dotnet build src/csharp/FlashAlpha.QuantConnect.sln -c Release --no-restore
- name: Test (integration tests against live API)
env:
FLASHALPHA_API_KEY: ${{ secrets.FLASHALPHA_API_KEY }}
run: dotnet test src/csharp/FlashAlpha.QuantConnect.sln -c Release --no-build --filter "Category=Integration" --logger "console;verbosity=normal"
python:
name: Python install + tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install package + dev deps
working-directory: src/python
run: pip install -e ".[dev]"
- name: Test
working-directory: src/python
env:
FLASHALPHA_API_KEY: ${{ secrets.FLASHALPHA_API_KEY }}
run: pytest -v --tb=short
schema-drift:
name: Schema drift guard
runs-on: ubuntu-latest
needs: [csharp, python]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Run drift guard
run: dotnet test src/csharp/FlashAlpha.QuantConnect.sln --filter "FullyQualifiedName~SchemaDriftGuard"
secrets-scan:
name: Gitleaks CLI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- name: Install gitleaks
run: |
curl -sSL https://github.com/gitleaks/gitleaks/releases/download/v8.18.4/gitleaks_8.18.4_linux_x64.tar.gz | tar -xz
sudo mv gitleaks /usr/local/bin/
- name: Scan
run: gitleaks detect --source . --no-banner --exit-code 1
docs:
name: Markdown link check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check markdown links (skip superpowers/ spec files with placeholder URLs)
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
folder-path: 'docs/recipes'
file-path: 'README.md, CHANGELOG.md, docs/getting-started.md, docs/data-types.md, docs/auth.md, docs/troubleshooting.md'