diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bee88bc..489afe4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,7 +12,7 @@ on: - main jobs: - fmt-lint-test: + ci: runs-on: ubuntu-latest steps: - name: Check out @@ -26,17 +26,22 @@ jobs: rustup component add rustfmt --toolchain nightly # rustup component add clippy --toolchain nightly + - name: Install just + uses: taiki-e/install-action@v2 + with: + tool: just + - name: Install protoc uses: arduino/setup-protoc@v2 - name: Set up Rust cache uses: Swatinem/rust-cache@v2 - - name: Check code format (cargo fmt) - run: cargo +nightly fmt --check + - name: Check code format + run: just fmt_check - - name: Lint (cargo clippy) - run: cargo clippy --no-deps -- -D warnings + - name: Run linter + run: just lint - - name: Test (cargo test) - run: cargo test + - name: Run tests + run: just test diff --git a/hello-tracing-backend/Dockerfile b/hello-tracing-backend/Dockerfile index 3044dfc..2ae6eb4 100644 --- a/hello-tracing-backend/Dockerfile +++ b/hello-tracing-backend/Dockerfile @@ -1,4 +1,4 @@ -ARG RUST_VERSION=1.70.0 +ARG RUST_VERSION=1.72.1 FROM rust:${RUST_VERSION}-bullseye AS builder RUN apt-get update && \ diff --git a/hello-tracing-gateway/Dockerfile b/hello-tracing-gateway/Dockerfile index 0a5a415..238a9cb 100644 --- a/hello-tracing-gateway/Dockerfile +++ b/hello-tracing-gateway/Dockerfile @@ -1,4 +1,4 @@ -ARG RUST_VERSION=1.70.0 +ARG RUST_VERSION=1.72.1 FROM rust:${RUST_VERSION}-bullseye AS builder RUN apt-get update && \ diff --git a/justfile b/justfile index 49d3a02..16b5c05 100644 --- a/justfile +++ b/justfile @@ -1,13 +1,14 @@ set shell := ["bash", "-uc"] -rust_version := `grep 'rust-version' Cargo.toml | grep -Eo '\d+\.\d+\.\d+'` - check: cargo check --tests fmt: cargo +nightly fmt +fmt_check: + cargo +nightly fmt --check + lint: cargo clippy --no-deps -- -D warnings @@ -33,12 +34,10 @@ run-backend: docker: docker build \ - --build-arg RUST_VERSION={{rust_version}} \ -t hseeberger/hello-tracing-backend \ -f hello-tracing-backend/Dockerfile \ . docker build \ - --build-arg RUST_VERSION={{rust_version}} \ -t hseeberger/hello-tracing-gateway \ -f hello-tracing-gateway/Dockerfile \ .