swaysome/.gitlab-ci.yml
2025-04-13 14:58:42 +02:00

29 lines
658 B
YAML

image: "rust:latest"
lint:
stage: build
script:
- rustc --version && cargo --version
- rustup component add rustfmt
- cargo fmt
build:
stage: build
script:
- rustc --version && cargo --version
- cargo build --release
artifacts:
paths:
- target/release/swaysome
test:integration:
stage: test
script:
- apt update && apt install -y --no-install-recommends sway foot
- adduser test
- chown -R test:test .
- su test <<EOSU # sway won't run as root
- set -e
# This is weird syntax to only run integration tests (the only ones swaysome has)
- cargo test --verbose --test '*'
- EOSU