-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: update exon, add s3 tests (#81)
- Loading branch information
Showing
6 changed files
with
78 additions
and
11 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
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
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,54 @@ | ||
set -e | ||
|
||
DOCKER_IMAGE="public.ecr.aws/localstack/localstack:latest" | ||
|
||
source venv/bin/activate | ||
|
||
# Setup the trap. | ||
function teardown { | ||
echo "Tearing down..." | ||
|
||
# Find the docker container using the image. | ||
CONTAINER_ID=$(docker ps -q -f ancestor=$DOCKER_IMAGE) | ||
|
||
# Stop the container. | ||
docker stop $CONTAINER_ID | ||
|
||
echo "Teardown completed." | ||
} | ||
|
||
# check docker and aws cli are installed | ||
if ! command -v docker &> /dev/null | ||
then | ||
echo "docker could not be found" | ||
exit | ||
fi | ||
|
||
if ! command -v aws &> /dev/null | ||
then | ||
echo "aws cli could not be found" | ||
exit | ||
fi | ||
|
||
|
||
# Setup | ||
echo "Setting up..." | ||
|
||
# Start the localstack container. | ||
docker run -d -p 4566:4566 $DOCKER_IMAGE | ||
|
||
# Wait for the stack to start. | ||
sleep 2 | ||
|
||
trap teardown EXIT | ||
|
||
# Create the test bucket. | ||
aws --endpoint-url=http://localhost:4566 s3 mb s3://test-bucket | ||
|
||
# Upload the test data. | ||
aws --endpoint-url=http://localhost:4566 s3api put-object --bucket test-bucket --key test.fasta --body ./python/tests/data/test.fasta | ||
|
||
# Make the bucket public. | ||
aws --endpoint-url=http://localhost:4566 s3api put-bucket-acl --bucket test-bucket --acl public-read | ||
|
||
pytest |
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
maturin | ||
pytest | ||
ruff | ||
awscli | ||
awscli-local | ||
polars |