Add tests for plume webserver (#513)
* begin setup front-end test environment with selenium * run migrations before tests * use https for tests
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
localhost:443 {
|
||||
proxy / localhost:7878 {
|
||||
transparent
|
||||
}
|
||||
tls self_signed
|
||||
}
|
||||
@@ -4,16 +4,29 @@ ENV PATH="/root/.cargo/bin:${PATH}"
|
||||
#install native/circleci/build dependancies
|
||||
RUN apt update &&\
|
||||
apt install -y git ssh tar gzip ca-certificates &&\
|
||||
apt install -y binutils-dev build-essential cmake curl gcc gettext git libcurl4-openssl-dev libdw-dev libelf-dev libiberty-dev libpq-dev libsqlite3-dev libssl-dev make openssl pkg-config postgresql postgresql-contrib python zlib1g-dev
|
||||
apt install -y binutils-dev build-essential cmake curl gcc gettext git libcurl4-openssl-dev libdw-dev libelf-dev libiberty-dev libpq-dev libsqlite3-dev libssl-dev make openssl pkg-config postgresql postgresql-contrib python zlib1g-dev python3-pip
|
||||
|
||||
#install and configure rust
|
||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2019-03-23 -y &&\
|
||||
rustup component add rustfmt clippy &&\
|
||||
rustup component add rust-std --target wasm32-unknown-unknown &&\
|
||||
cargo install cargo-web &&\
|
||||
rustup component add rust-std --target wasm32-unknown-unknown
|
||||
|
||||
#compile some deps
|
||||
RUN cargo install cargo-web &&\
|
||||
cargo install diesel_cli --no-default-features --features postgres,sqlite --version '=1.3.0' &&\
|
||||
rm -fr ~/.cargo/registry
|
||||
|
||||
#install coverage tools
|
||||
RUN curl -L https://github.com/SimonKagstrom/kcov/archive/master.tar.gz | tar xz &&\
|
||||
mkdir -p kcov-master/build && cd kcov-master/build && cmake .. && make &&\
|
||||
make install && cd ../.. && rm -rf kcov-master
|
||||
|
||||
#set some compilation parametters
|
||||
COPY cargo_config /root/.cargo/config
|
||||
|
||||
#install selenium for front end tests
|
||||
RUN pip3 install selenium
|
||||
|
||||
#install and configure caddy
|
||||
RUN curl https://getcaddy.com | bash -s personal
|
||||
COPY Caddyfile /Caddyfile
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
[target.x86_64-unknown-linux-gnu]
|
||||
# link dead code for coverage, attempt to reduce linking memory usage to not get killed
|
||||
rustflags = ["-Clink-dead-code", "-Clink-args=-Xlinker --no-keep-memory -Xlinker --reduce-memory-overheads"]
|
||||
Reference in New Issue
Block a user