fix: reduce test run time (#1832)

Signed-off-by: Alexei Dodon <adodon@cisco.com>
This commit is contained in:
Alexei Dodon
2023-09-28 21:59:52 +03:00
committed by GitHub
parent ba6f347d8d
commit 3a9a932791
25 changed files with 879 additions and 705 deletions
@@ -0,0 +1,21 @@
name: 'Check disk space'
description: 'Show available disk space'
runs:
using: "composite"
steps:
- shell: bash
if: always()
run: |
cd $GITHUB_WORKSPACE
set -x
df -h
sudo ls -lRh /tmp/* || true
sudo du -sh /tmp || true
sudo du -sh /tmp/* || true
sudo find /tmp/ -size +5M | sudo xargs ls -lh
du -sh ./* || true
find ./ -size +5M | xargs ls -lh
sudo du -sh /var/
sudo du -sh /var/lib/docker/
du -sh /home/runner/work/
set +x
@@ -0,0 +1,19 @@
name: 'Setup localstack service'
description: 'Download & run localstack container'
runs:
using: "composite"
steps:
- shell: bash
run: |
pip install localstack # Install LocalStack cli
docker pull localstack/localstack:2.2 # Make sure to pull the latest version of the image
localstack start -d # Start LocalStack in the background
echo "Waiting for LocalStack startup..." # Wait 30 seconds for the LocalStack container
localstack wait -t 30 # to become ready before timing out
echo "Startup complete"
aws dynamodb --endpoint-url http://localhost:4566 --region "us-east-2" create-table --table-name BlobTable --attribute-definitions AttributeName=Digest,AttributeType=S --key-schema AttributeName=Digest,KeyType=HASH --provisioned-throughput ReadCapacityUnits=10,WriteCapacityUnits=5
env:
AWS_ACCESS_KEY_ID: fake
AWS_SECRET_ACCESS_KEY: fake
@@ -0,0 +1,8 @@
name: 'Stop localstack'
description: 'Stop localstack container'
runs:
using: "composite"
steps:
- shell: bash
if: always()
run: localstack stop