aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.dockerignore4
-rw-r--r--.milli-ci/Dockerfile14
-rw-r--r--.milli-ci/test.sh4
3 files changed, 22 insertions, 0 deletions
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..9a5d167
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,4 @@
+*
+!/.milli-ci
+!/src
+!/Cargo.*
diff --git a/.milli-ci/Dockerfile b/.milli-ci/Dockerfile
new file mode 100644
index 0000000..b85473a
--- /dev/null
+++ b/.milli-ci/Dockerfile
@@ -0,0 +1,14 @@
+FROM rust:latest
+RUN rustup component add clippy rustfmt
+WORKDIR /usr/src/makers
+COPY Cargo.* .
+RUN mkdir src
+RUN echo "fn main() {}" > src/main.rs
+RUN cargo check
+RUN cargo test
+RUN cargo build
+RUN rm src/main.rs
+COPY . .
+RUN touch src/main.rs
+RUN chmod +x .milli-ci/test.sh
+CMD [".milli-ci/test.sh"]
diff --git a/.milli-ci/test.sh b/.milli-ci/test.sh
new file mode 100644
index 0000000..72358e1
--- /dev/null
+++ b/.milli-ci/test.sh
@@ -0,0 +1,4 @@
+#!/bin/sh -ex
+cargo test --no-fail-fast
+cargo clippy
+cargo fmt --check