remove old docker stuff
This commit is contained in:
1 parent
969ad1d6bb
commit
ed568be4cb
6 files changed
-109
No files matched your search
@@ -1,14 +0,0 @@
|
||||
FROM rust:1.58-buster
|
||||
|
||||
RUN apt update
|
||||
RUN apt install -y \
|
||||
libglib2.0-dev \
|
||||
libgtk-3-dev \
|
||||
libsoup2.4-dev \
|
||||
libappindicator3-dev \
|
||||
libwebkit2gtk-4.0-dev \
|
||||
firefox-esr \
|
||||
# for Tarpaulin code coverage
|
||||
liblzma-dev binutils-dev libcurl4-openssl-dev libdw-dev libelf-dev
|
||||
|
||||
CMD ["exit"]
|
||||
@@ -1,7 +0,0 @@
|
||||
FROM dioxus-test-image
|
||||
|
||||
WORKDIR /run_test
|
||||
RUN cargo install cargo-tarpaulin
|
||||
RUN cargo cache -a
|
||||
|
||||
ENTRYPOINT [ "bash" ]
|
||||
@@ -1,8 +0,0 @@
|
||||
FROM dioxus-base-test-image
|
||||
|
||||
RUN cargo install cargo-binstall
|
||||
RUN cargo install cargo-make
|
||||
RUN cargo install wasm-pack
|
||||
RUN cargo install cargo-cache && cargo cache -a
|
||||
|
||||
CMD ["exit"]
|
||||
@@ -1,9 +0,0 @@
|
||||
FROM dioxus-pre-test
|
||||
|
||||
RUN mkdir run_test
|
||||
COPY tmp /run_test
|
||||
WORKDIR /run_test
|
||||
RUN cargo test --workspace --tests
|
||||
RUN cargo cache -a
|
||||
|
||||
CMD ["exit"]
|
||||
@@ -1,27 +0,0 @@
|
||||
# Why this?
|
||||
|
||||
This part is used to test whole package before pushing it
|
||||
|
||||
# How to use it?
|
||||
|
||||
Just run in the folder:
|
||||
`bash run_local_tests.sh`. If nothing fails, then you can push your code to the repo.
|
||||
or run:
|
||||
`bash run_local_tests.sh --with-full-docker-cleanup`
|
||||
for cleaning up images as well
|
||||
|
||||
# How is it composed of?
|
||||
|
||||
1. `Dockerfile_pre_test` will build the base image for the tests to be run into
|
||||
2. `Dockerfile_test` will run the actual tests based on 1.
|
||||
3. `run_local_tests.sh` to wrap this up
|
||||
|
||||
# Warning
|
||||
|
||||
The task requires some amount of CPU work and disk space (5GB per tests). Some clean up is included in the script.
|
||||
|
||||
# Requirements
|
||||
|
||||
* [docker](https://docs.docker.com/engine/install/)
|
||||
* bash
|
||||
* rsync
|
||||
@@ -1,44 +0,0 @@
|
||||
set -eux
|
||||
|
||||
echo "Test script started"
|
||||
|
||||
function run_script {
|
||||
if [[ -d tmp ]]
|
||||
then
|
||||
rm -rf tmp
|
||||
fi
|
||||
mkdir tmp
|
||||
# copy files first
|
||||
rsync -a --progress ../ tmp --exclude target --exclude docker
|
||||
|
||||
# build base image
|
||||
docker build -f Dockerfile_base_test_image -t dioxus-base-test-image .
|
||||
docker build -f Dockerfile_pre_test -t dioxus-pre-test .
|
||||
# run test
|
||||
docker build -f Dockerfile_test -t dioxus-test-image .
|
||||
# code coverage
|
||||
docker build -f Dockerfile_code_coverage -t dioxus-code-coverage .
|
||||
|
||||
# exec test coverage
|
||||
cd .. && \
|
||||
echo "rustup default nightly && cargo +nightly tarpaulin --verbose --all-features --tests --workspace --exclude core-macro --timeout 120 --out Html" | docker run -i --rm --security-opt seccomp=unconfined -v "/home/elios/project/prs/dioxus/:/run_test" dioxus-code-coverage
|
||||
|
||||
# clean up
|
||||
rm -rf tmp
|
||||
if [ $# -ge 1 ]
|
||||
then
|
||||
echo "Got some parameter"
|
||||
if [ $1 = "--with-full-docker-cleanup" ]
|
||||
then
|
||||
docker image rm dioxus-base-test-image
|
||||
docker image rm dioxus-test-image
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
run_script || echo "Error occured.. cleaning a bit." && \
|
||||
docker system prune -f;
|
||||
|
||||
docker system prune -f
|
||||
|
||||
echo "Script finished to execute"
|
||||
Reference in new issue
Block a user