-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/mqttRelayPrototype#SRV-534' of github.com:tago-io/…
…microservice-mqtt-bridge into feat/mqttRelayPrototype#SRV-534
- Loading branch information
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Code Quality | ||
|
||
on: push | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust toolchain | ||
run: | | ||
rustup update --no-self-update stable | ||
rustup component add --toolchain stable rustfmt | ||
rustup default stable | ||
- name: Build | ||
run: cargo build --verbose | ||
|
||
- name: Run tests | ||
run: cargo test --verbose | ||
|
||
- name: Run clippy | ||
run: cargo clippy -- -D warnings | ||
|
||
- name: Run fmt check | ||
run: cargo fmt -- --check | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM rust:slim-bookworm as build | ||
ARG TAGOIO_SOURCE_FOLDER="/tago-io" | ||
|
||
RUN apt update | ||
RUN apt install -y protobuf-compiler libssl-dev gcc pkg-config build-essential | ||
|
||
RUN mkdir -p ${TAGOIO_SOURCE_FOLDER} | ||
WORKDIR ${TAGOIO_SOURCE_FOLDER} | ||
ADD . ${TAGOIO_SOURCE_FOLDER} | ||
|
||
RUN cargo build --release | ||
|
||
FROM debian:bookworm-slim | ||
ARG TAGOIO_SOURCE_FOLDER="/tago-io" | ||
|
||
RUN apt update | ||
RUN apt install -y build-essential netcat-traditional ca-certificates | ||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN mkdir -p ${TAGOIO_SOURCE_FOLDER} | ||
WORKDIR ${TAGOIO_SOURCE_FOLDER} | ||
COPY --from=build ${TAGOIO_SOURCE_FOLDER}/target/release/tagoio-mqtt-relay . | ||
COPY --from=build ${TAGOIO_SOURCE_FOLDER}/config.toml config.toml | ||
|
||
ENTRYPOINT ["/tago-io/tagoio-mqtt-relay"] |