|
6 | 6 | This directory contains reusable composite actions and workflow definitions for |
7 | 7 | CI/CD, testing, publishing, and automation within the NautilusTrader repository. |
8 | 8 |
|
9 | | -## Composite Actions (`.github/actions`) |
| 9 | +## Composite actions (`.github/actions`) |
10 | 10 |
|
11 | | -- **common-setup**: prepares the environment (OS packages, Rust toolchain, Python, |
12 | | - sccache, mold, pre-commit). |
| 11 | +- **common-setup**: prepares the environment (OS packages, Rust toolchain, Python, sccache, pre-commit). |
13 | 12 | - **common-test-data**: caches large test data under `tests/test_data/large`. |
14 | | -- **common-wheel-build**: builds and installs Python wheels across Linux, |
15 | | - macOS, and Windows for multiple Python versions. |
16 | | -- **publish-wheels**: publishes built wheels to Cloudflare R2, manages old wheel |
17 | | - cleanup and index generation. |
| 13 | +- **common-wheel-build**: builds and installs Python wheels across Linux, macOS, and Windows for multiple Python versions. |
| 14 | +- **publish-wheels**: publishes built wheels to Cloudflare R2, manages old wheel cleanup and index generation. |
18 | 15 | - **upload-artifact-wheel**: uploads the latest wheel artifact to GitHub Actions. |
19 | 16 |
|
20 | 17 | ## Workflows (`.github/workflows`) |
21 | 18 |
|
22 | | -- **build.yml**: runs pre-commit, Rust tests, Python tests, builds wheels on multiple |
23 | | - platforms, and uploads wheel artifacts. |
24 | | -- **build-docs.yml**: dispatches a repository event to trigger the documentation build |
25 | | - on `master` and `nightly` pushes. |
26 | | -- **codeql-analysis.yml**: schedules and runs CodeQL security scans on pull requests |
27 | | - and periodically via cron. |
| 19 | +- **build.yml**: runs pre-commit, Rust tests, Python tests, builds wheels on multiple platforms, and uploads wheel artifacts. |
| 20 | +- **build-docs.yml**: dispatches a repository event to trigger the documentation build on `master` and `nightly` pushes. |
| 21 | +- **codeql-analysis.yml**: schedules and runs CodeQL security scans on pull requests and periodically via cron. |
28 | 22 | - **coverage.yml**: (optional) coverage report generation for the `nightly` branch. |
29 | | -- **docker.yml**: builds and pushes Docker images (`nautilus_trader`, `jupyterlab`) |
30 | | - for `master` and `nightly` branches using Buildx and QEMU. |
31 | | -- **nightly-merge.yml**: automatically merges `develop` into `nightly` when the |
32 | | - latest `develop` workflows succeed. |
33 | | -- **performance.yml**: runs Rust/Python performance benchmarks on the `nightly` branch |
34 | | - and reports to CodSpeed. |
| 23 | +- **docker.yml**: builds and pushes Docker images (`nautilus_trader`, `jupyterlab`) for `master` and `nightly` branches using Buildx and QEMU. |
| 24 | +- **nightly-merge.yml**: automatically merges `develop` into `nightly` when the latest `develop` workflows succeed. |
| 25 | +- **performance.yml**: runs Rust/Python performance benchmarks on the `nightly` branch and reports to CodSpeed. |
35 | 26 |
|
36 | 27 | ## Security |
37 | 28 |
|
38 | | -- **Immutable Action Pinning**: all third-party actions are pinned to specific commit |
39 | | - SHAs to guarantee immutability and reproducibility. |
40 | | -- **Hardened Runners**: most workflows employ `step-security/harden-runner` with an |
41 | | - `egress-policy: audit` to reduce attack surface and monitor outbound traffic. |
42 | | -- **Secret Management**: no secrets or credentials are stored in the repo. AWS, PyPI, |
43 | | - and other credentials are provided via GitHub Secrets and injected at runtime. |
44 | | -- **Code Scanning**: CodeQL is enabled for continuous security analysis. |
45 | | -- **Dependency Pinning**: key tools (pre-commit, Python versions, Rust toolchain, |
46 | | - mold, cargo-nextest) are locked to fixed versions or SHAs. |
47 | | -- **Least-Privilege Tokens**: workflows default the `GITHUB_TOKEN` to |
| 29 | +- **Immutable action pinning**: all third-party actions are pinned to specific commit SHAs to guarantee immutability and reproducibility. |
| 30 | +- **Hardened runners**: most workflows employ `step-security/harden-runner` with an `egress-policy: audit` to reduce attack surface and monitor outbound traffic. |
| 31 | +- **Secret management**: no secrets or credentials are stored in the repo. AWS, PyPI, and other credentials are provided via GitHub Secrets and injected at runtime. |
| 32 | +- **Code scanning**: CodeQL is enabled for continuous security analysis. |
| 33 | +- **Dependency pinning**: key tools (pre-commit, Python versions, Rust toolchain, cargo-nextest) are locked to fixed versions or SHAs. |
| 34 | +- **Least-privilege tokens**: workflows default the `GITHUB_TOKEN` to |
48 | 35 | `contents: read, actions: read` and selectively elevate scopes (e.g. |
49 | 36 | `contents: write`) only for the jobs that need to tag a release or upload |
50 | 37 | assets. This follows the principle of least privilege and limits blast |
51 | 38 | radius if a job is compromised. |
52 | | -- **Caching**: caches for sccache, pip/site-packages, pre-commit, and test data |
53 | | - speed up workflows while preserving hermetic builds. |
| 39 | +- **Caching**: caches for sccache, pip/site-packages, pre-commit, and test data speed up workflows while preserving hermetic builds. |
54 | 40 |
|
55 | 41 | For updates or changes to actions or workflows, please adhere to the repository's |
56 | 42 | CONTRIBUTING guidelines and maintain these security best practices. |
0 commit comments