Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Latest Docker
run: |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce
- name: Run Integration Tests
run: bash ./run_integration_tests.sh
- name: Rename logs
Expand Down
2 changes: 1 addition & 1 deletion postgres.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# limitations under the License.

FROM postgres:15
COPY postgres_init.sh /docker-entrypoint-initdb.d/
COPY --chmod=755 postgres_init.sh /docker-entrypoint-initdb.d/
10 changes: 5 additions & 5 deletions run_integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# update pip version
python3 -m pip install --user --upgrade pip setuptools wheel

# Create test venv
# create test venv
ENV_NAME=".tightlock_integration_test_venv"
python3 -m venv $ENV_NAME

Expand All @@ -24,11 +24,11 @@ PY3=$ENV_NAME/bin/python

$PY3 -m pip install -r integration_tests/test_requirements.txt

# Create env
./create_env.sh non-interactive test
# create env
./create_env.sh non-interactive test

# Remove potentially running containers and run integration tests
docker-compose down
# remove potentially running containers and run integration tests
docker-compose down -v
$PY3 -m pytest -s --no-header -vv --docker-compose=docker-compose.yaml integration_tests/

# get return value of integration tests run
Expand Down
7 changes: 5 additions & 2 deletions run_tightlock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,18 @@
esac
done

# Create env
# create env
bash ./create_env.sh $INTERACTIVE_FLAG $ENV_FLAG $PROVIDED_API_KEY

# enable docker buildkit
export DOCKER_BUILDKIT=1

# define which docker-compose command to use based on the environment
if [ $ENV_FLAG == "prod" ]; then
COMPOSE_CMD="docker run -v /var/run/docker.sock:/var/run/docker.sock --rm -v $PWD:$PWD -w $PWD docker/compose:1.29.2"
else
COMPOSE_CMD='docker-compose'
fi

# Run containers
# run containers
$COMPOSE_CMD up --build -d