7 files changed
+53
-18
No files matched your search
@@ -0,0 +1,14 @@
|
|||||||
|
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"]
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
FROM dioxus-test-image
|
||||||
|
|
||||||
|
WORKDIR /run_test
|
||||||
|
RUN cargo install cargo-tarpaulin
|
||||||
|
RUN cargo cache -a
|
||||||
|
|
||||||
|
ENTRYPOINT [ "bash" ]
|
||||||
@@ -1,20 +1,8 @@
|
|||||||
FROM rust:1.58-buster
|
FROM dioxus-base-test-image
|
||||||
|
|
||||||
RUN apt update
|
RUN cargo install cargo-binstall
|
||||||
RUN apt install -y \
|
RUN cargo install cargo-make
|
||||||
libglib2.0-dev \
|
RUN cargo install wasm-pack
|
||||||
libgtk-3-dev \
|
|
||||||
libsoup2.4-dev \
|
|
||||||
libappindicator3-dev \
|
|
||||||
libwebkit2gtk-4.0-dev \
|
|
||||||
firefox-esr
|
|
||||||
# for kcov and Tarpaulin
|
|
||||||
#liblzma-dev binutils-dev libcurl4-openssl-dev libdw-dev libelf-dev
|
|
||||||
|
|
||||||
RUN cargo install cargo-make --debug
|
|
||||||
# for test coverage
|
|
||||||
#RUN cargo install cargo-tarpaulin
|
|
||||||
# clean up a bit
|
|
||||||
RUN cargo install cargo-cache && cargo cache -a
|
RUN cargo install cargo-cache && cargo cache -a
|
||||||
|
|
||||||
CMD ["exit"]
|
CMD ["exit"]
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
FROM dioxus-base-test-image
|
FROM dioxus-pre-test
|
||||||
|
|
||||||
RUN mkdir run_test
|
RUN mkdir run_test
|
||||||
COPY tmp /run_test
|
COPY tmp /run_test
|
||||||
WORKDIR /run_test
|
WORKDIR /run_test
|
||||||
RUN cargo make tests
|
RUN cargo make tests
|
||||||
|
RUN cargo cache -a
|
||||||
|
|
||||||
CMD ["exit"]
|
CMD ["exit"]
|
||||||
@@ -12,9 +12,16 @@ function run_script {
|
|||||||
rsync -a --progress ../ tmp --exclude target --exclude docker
|
rsync -a --progress ../ tmp --exclude target --exclude docker
|
||||||
|
|
||||||
# build base image
|
# build base image
|
||||||
docker build -f Dockerfile_pre_test -t dioxus-base-test-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
|
# run test
|
||||||
docker build -f Dockerfile_test -t dioxus-test-image .
|
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
|
# clean up
|
||||||
rm -rf tmp
|
rm -rf tmp
|
||||||
|
|||||||
@@ -76,3 +76,20 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
command: clippy
|
command: clippy
|
||||||
args: -- -D warnings
|
args: -- -D warnings
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
name: Coverage
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: xd009642/tarpaulin:develop-nightly
|
||||||
|
options: --security-opt seccomp=unconfined
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Generate code coverage
|
||||||
|
run: |
|
||||||
|
apt-get update &&\
|
||||||
|
apt install libwebkit2gtk-4.0-dev libappindicator3-dev libgtk-3-dev -y &&\
|
||||||
|
cargo +nightly tarpaulin --verbose --tests --all-features --workspace --timeout 120 --out Xml
|
||||||
|
- name: Upload to codecov.io
|
||||||
|
uses: codecov/codecov-action@v2
|
||||||
@@ -8,3 +8,4 @@ Cargo.lock
|
|||||||
!.vscode/tasks.json
|
!.vscode/tasks.json
|
||||||
!.vscode/launch.json
|
!.vscode/launch.json
|
||||||
!.vscode/extensions.json
|
!.vscode/extensions.json
|
||||||
|
tarpaulin-report.html
|
||||||
Reference in new issue
Block a user