Skip to content

Commit

Permalink
Merge branch 'develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
cmeissner authored Jan 12, 2025
2 parents f2aecf3 + c620d59 commit 15ebb17
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
matrix:
phpipam-version: ['v1.4x', 'v1.5x']
steps:
- name: Upgrade docker-compose
run: sudo apt-get install --upgrade docker-compose
- uses: actions/checkout@v3
- name: setup phpipam
uses: codeaffen/phpipam-action@v2
Expand All @@ -18,7 +20,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
python-version: '3.9'
- name: setup test environment
run: |
make test-setup
Expand Down
2 changes: 2 additions & 0 deletions tests/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ services:
IPAM_DATABASE_NAME: "phpipam"
depends_on:
- database
container_name: phpipam_test_webserver
database:
image: mariadb:10.3.18
ports:
Expand All @@ -20,3 +21,4 @@ services:
MYSQL_USER: "phpipam"
MYSQL_PASSWORD: "phpipamadmin"
MYSQL_DATABASE: "phpipam"
container_name: phpipam_test_db
4 changes: 2 additions & 2 deletions tests/docker/setup_database.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if grep -q podman <<< $(docker --version 2> /dev/null) ; then
if grep -iq podman <<< $(docker version 2> /dev/null) ; then
echo "Podman is installed"
DOCKER_CMD=$(which podman)
fi
Expand All @@ -13,7 +13,7 @@ done
echo "Database is up"

echo "Creating database ${DB_NAME:-phpipam}"
${DOCKER_CMD} exec -ti docker_phpipam_1 sh -c 'mysql -h database -u phpipam -pphpipamadmin phpipam < /phpipam/db/SCHEMA.sql'
${DOCKER_CMD} exec -ti phpipam_test_webserver sh -c 'mysql -h database -u phpipam -pphpipamadmin phpipam < /phpipam/db/SCHEMA.sql'

echo "Activating API"
mysql -u phpipam -pphpipamadmin -h "${DB_HOST:-127.0.0.1}" phpipam --execute="UPDATE settings SET api=1 WHERE id=1;"
Expand Down

0 comments on commit 15ebb17

Please sign in to comment.