mirror of
https://codeberg.org/JasterV/event_bus.rs.git
synced 2026-04-26 18:10:02 +00:00
by moving the PATH re-declaration into the runtime Reviewed-on: https://codeberg.org/JasterV/event_bus.rs/pulls/1 Reviewed-by: Victor Martinez Montané <jasterv@noreply.codeberg.org> Co-authored-by: 6543 <6543@obermui.de> Co-committed-by: 6543 <6543@obermui.de>
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
when:
|
|
- event: [push, pull_request]
|
|
branch: main
|
|
|
|
# Define common environment variables for all steps
|
|
variables:
|
|
- &rust_env
|
|
CARGO_HOME: ${CI_WORKSPACE}/.cargo
|
|
CARGO_TERM_COLOR: always
|
|
- &pre_cmds
|
|
- export PATH=${CI_WORKSPACE}/.cargo/bin:$PATH
|
|
|
|
steps:
|
|
setup:
|
|
image: rust:1.93.1
|
|
environment:
|
|
<<: *rust_env
|
|
commands:
|
|
- <<: *pre_cmds
|
|
- apt-get update && apt-get install -y coreutils
|
|
- rustup component add clippy rustfmt
|
|
# Install cargo-binstall into our local bin folder
|
|
- mkdir -p .cargo/bin
|
|
- curl -Lskj https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz | tar -xz -C .cargo/bin
|
|
# Binstall will now use the CARGO_HOME we defined
|
|
- cargo binstall --no-confirm cargo-make cargo-deny cargo-nextest
|
|
|
|
lint:
|
|
image: rust:1.93.1
|
|
environment:
|
|
<<: *rust_env
|
|
commands:
|
|
- <<: *pre_cmds
|
|
- cargo make -p ci fmt-check
|
|
- cargo make -p ci clippy
|
|
- cargo make -p ci deny-check
|
|
- cargo make -p ci docs
|
|
|
|
test:
|
|
image: rust:1.93.1
|
|
environment:
|
|
<<: *rust_env
|
|
commands:
|
|
- <<: *pre_cmds
|
|
- cargo make -p ci test
|