-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove deprecated tests. Add local dev Dockerfile and scripts to…
… run tests in docker
- Loading branch information
Showing
6 changed files
with
54 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM rust:1.82-bullseye | ||
|
||
# Update and install necessary packages, including libc6-dev for libresolv | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
wget \ | ||
curl \ | ||
libpq-dev \ | ||
pkg-config \ | ||
clang \ | ||
build-essential \ | ||
libc6-dev \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Ensure CA certificates are installed | ||
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates | ||
|
||
WORKDIR /app | ||
|
||
#Install go | ||
COPY scripts/install-go.sh install-go.sh | ||
RUN ./install-go.sh | ||
ENV PATH=$PATH:/usr/local/go/bin | ||
|
||
# Set Rust flags to link against libresolv | ||
ENV RUSTFLAGS="-C link-arg=-lresolv" | ||
|
||
# Download and install dev environment deps | ||
RUN cargo install --locked cargo-binstall | ||
|
||
# Install nextest for tests... | ||
RUN cargo binstall cargo-nextest --secure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
# NOTE: Run from project root ./scripts/docker-run-tests.sh | ||
|
||
docker build -t graphcast-sdk-dev -f Dockerfile.dev . | ||
docker run --rm -v .:/app graphcast-sdk-dev cargo nextest run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ $(uname -m) = "aarch64" ]; then | ||
wget https://golang.org/dl/go1.20.13.linux-arm64.tar.gz && | ||
tar -C /usr/local -xzf go1.20.13.linux-arm64.tar.gz | ||
else | ||
wget https://golang.org/dl/go1.20.13.linux-amd64.tar.gz && | ||
tar -C /usr/local -xzf go1.20.13.linux-amd64.tar.gz | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters