version_requirements:
- command: "cargo nextest --version"
minimum_version: "0.9.0"
split: true
file_requirements:
- path: "Cargo.toml"
- path: ".env"
create_if_not_exists: true
templates:
- name: docker_build
command: "docker build {path} -t rox:{image_tag}"
symbols: ["{path}", "{image_tag}"]
pipelines:
- name: build-release-all
description: "Build a release artifact binary and Docker image"
stages:
- ["build-release-binary", "build-release-image"]
- name: ci
description: "Run all CI-related tasks"
stages:
- ["fmt", "clippy-ci"]
- ["test"]
tasks:
- name: "wt"
command: "cargo watch -c -x test"
description: "Rerun tests on every file change"
- name: "wc"
command: "cargo watch -c -x check"
description: "Rerun checks on every file change"
- name: "clippy-ci"
description: "Run Clippy with a non-zero exit if warnings are found."
command: "cargo clippy -- -D warnings"
- name: fmt
command: "cargo fmt"
- name: test
command: "cargo nextest run"
description: "Run tests"
- name: build-binary
command: "cargo build"
description: "Build the dev binary"
- name: run
description: "Runs the 'help' command as a basic test"
command: "cargo run help"
- name: build-release-binary
description: "Build a release binary with cargo."
command: "cargo build --release"
- name: build-release-image
description: "Build a production image for Docker."
command: "docker build tests/files/ -t rox:latest"