Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Tests
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
on:
push:
branches: [main]
pull_request:
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: Serpent-Tools/serpentine-action@64c3c3d1efb5fe2555a0e3cb4534ce203a9ba144 # v1.0.0
with:
pipeline: ./ci/snek/main.snek
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ target
book
dist
.direnv
.jj
20 changes: 3 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,16 @@ Please join the [Discord Server](https://discord.gg/Rptzjf3Nnm) where we can ans

## Development Setup

Natrix uses [Dagger](https://dagger.io/) for containerized CI/CD pipeline execution and [`just`](https://github.com/casey/just) for task automation. Please follow the [Dagger installation guide](https://docs.dagger.io/install) to set up your development environment.

We also have a [Nix](https://nixos.org/) flake to setup a working dev environment for natrix.

~~**Why Dagger?** We use Dagger because Natrix has extensive E2E tests and benchmarks that would otherwise require installing around 10 different tools (Chrome, wasm-bindgen, wasm-opt, various Rust tools, etc.). With Dagger, all dependencies are containerized, ensuring consistent builds across environments.~~

> [!NOTE]
> We have since found out dagger doesnt fit our workflow too well, hence we are developing [Serpentine](https://github.com/Serpent-Tools/serpentine) to replace it

## Development Workflow

### Running the CI Pipeline

The primary way to run tests is through the justfile targets:

- **`just test [jobs]`** - Run the complete test suite
- **`just test_tui [jobs]`** - Run the complete test suite, but report results to the TUI instead of the allure report.
- **`just book`** - Compile and open the mdbook
- **`just fix`** - Runs automatic fixing of typos, formatting, and outdated snapshot tests.

> [!IMPORTANT]
> * The snapshot tests will assume the new results are correct, always verify the new output is correct in the error logs first.
> * `typos` might assume the wrong correction, always inspect the suggestions in its errors before running `just fix`
Natrix uses [Serpentine](https://github.com/Serpent-Tools/serpentine) for CI and local testing, the serpentine pipeline is stored in `./ci/snek/`, for easier use you can use the `justfile` targets,
`fast` runs unit testing and linters, while `ci` runs the slower integration tests as well.

the full pipeline will always be run in CI so dont worry about running the entire thing locally if it takes a while for you.

### Quick Development Iteration

Expand Down
Loading
Loading