diff --git a/.docker/Dockerfile_base_test_image b/.docker/Dockerfile_base_test_image deleted file mode 100644 index a29eac927..000000000 --- a/.docker/Dockerfile_base_test_image +++ /dev/null @@ -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"] diff --git a/.docker/Dockerfile_code_coverage b/.docker/Dockerfile_code_coverage deleted file mode 100644 index abcccb56d..000000000 --- a/.docker/Dockerfile_code_coverage +++ /dev/null @@ -1,7 +0,0 @@ -FROM dioxus-test-image - -WORKDIR /run_test -RUN cargo install cargo-tarpaulin -RUN cargo cache -a - -ENTRYPOINT [ "bash" ] diff --git a/.docker/Dockerfile_pre_test b/.docker/Dockerfile_pre_test deleted file mode 100644 index cc6f8810e..000000000 --- a/.docker/Dockerfile_pre_test +++ /dev/null @@ -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"] diff --git a/.docker/Dockerfile_test b/.docker/Dockerfile_test deleted file mode 100644 index bec7671e9..000000000 --- a/.docker/Dockerfile_test +++ /dev/null @@ -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"] diff --git a/.docker/README.md b/.docker/README.md deleted file mode 100644 index 57578f405..000000000 --- a/.docker/README.md +++ /dev/null @@ -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 \ No newline at end of file diff --git a/.docker/run_local_tests.sh b/.docker/run_local_tests.sh deleted file mode 100644 index b6da68541..000000000 --- a/.docker/run_local_tests.sh +++ /dev/null @@ -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"