aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-03-28 19:44:50 -0600
committerMelody Horn <melody@boringcactus.com>2021-03-28 19:44:50 -0600
commit832ba63ee267b96de7f6421315dbbb52eadbb80e (patch)
tree325c477627c12f6efca9c54f63fe3ccb1b165c44
parent98fa3e5246e83f8121922281a822a8d76f501750 (diff)
downloadmakers-832ba63ee267b96de7f6421315dbbb52eadbb80e.tar.gz
makers-832ba63ee267b96de7f6421315dbbb52eadbb80e.zip
add sketch of CI config
-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