File tree Expand file tree Collapse file tree 6 files changed +71
-2
lines changed
actions/start-hashtopolis Expand file tree Collapse file tree 6 files changed +71
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ services:
99 - CONTAINER_USER_CMD_PRE
1010 - CONTAINER_USER_CMD_POST
1111 environment :
12+ HASHTOPOLIS_DB_TYPE : mysql
1213 HASHTOPOLIS_DB_USER : hashtopolis
1314 HASHTOPOLIS_DB_PASS : hashtopolis
1415 HASHTOPOLIS_DB_HOST : hashtopolis-db-dev
Original file line number Diff line number Diff line change 1+ version : " 3.7"
2+ services :
3+ hashtopolis-server-dev :
4+ container_name : hashtopolis-server-dev
5+ build :
6+ context : ..
7+ target : hashtopolis-server-dev
8+ args :
9+ - CONTAINER_USER_CMD_PRE
10+ - CONTAINER_USER_CMD_POST
11+ environment :
12+ HASHTOPOLIS_DB_TYPE : postgres
13+ HASHTOPOLIS_DB_USER : hashtopolis
14+ HASHTOPOLIS_DB_PASS : hashtopolis
15+ HASHTOPOLIS_DB_HOST : hashtopolis-db-dev
16+ HASHTOPOLIS_DB_DATABASE : hashtopolis
17+ HASHTOPOLIS_APIV2_ENABLE : 1
18+ depends_on :
19+ - hashtopolis-db-dev
20+ ports :
21+ - " 8080:80"
22+ volumes :
23+ # This is where VS Code should expect to find your project's source code
24+ # and the value of "workspaceFolder" in .devcontainer/devcontainer.json
25+ - ..:/var/www/html
26+ - hashtopolis-server-dev:/usr/local/share/hashtopolis:Z
27+ networks :
28+ - hashtopolis_dev
29+ hashtopolis-db-dev :
30+ container_name : hashtopolis-db-dev
31+ image : mysql:8.0
32+ restart : always
33+ ports :
34+ - " 3306:3306"
35+ volumes :
36+ - hashtopolis-db-dev:/var/lib/mysql
37+ environment :
38+ MYSQL_ROOT_PASSWORD : hashtopolis
39+ MYSQL_DATABASE : hashtopolis
40+ MYSQL_USER : hashtopolis
41+ MYSQL_PASSWORD : hashtopolis
42+ networks :
43+ - hashtopolis_dev
44+ volumes :
45+ hashtopolis-db-dev :
46+ hashtopolis-server-dev :
47+
48+ networks :
49+ hashtopolis_dev :
50+ # This network will also be used by the python-agent
51+ name : hashtopolis_dev
Original file line number Diff line number Diff line change 11name : Start Hashtopolis server
22description : Starts application containers and waits for Hashtopolis to be ready.
33
4+ inputs :
5+ db_system :
6+ description : " Used to set which DB system should be used"
7+ required : true
8+ default : " mysql"
9+
410runs :
511 using : " composite"
612 steps :
713 - name : Start application containers
814 working-directory : .devcontainer
9- run : docker compose up -d
15+ run : docker compose up -f docker-compose.${{ env.INPUT_DB_SYSTEM }}.yml
1016 shell : bash
1117 - name : Install composer dependencies packages
1218 run : docker exec hashtopolis-server-dev composer install --working-dir=/var/www/html/
Original file line number Diff line number Diff line change 1313jobs :
1414 build :
1515 runs-on : ubuntu-latest
16+ strategy :
17+ matrix :
18+ include :
19+ - db_system : mysql
20+ - db_system : postgres
1621 steps :
1722 - name : Checkout repository
1823 uses : actions/checkout@v3
1924 - name : Start Hashtopolis server
2025 uses : ./.github/actions/start-hashtopolis
26+ with :
27+ db_system : ${{ matrix.db_system }}
2128 - name : Give Apache permissions on necessary directories # for the tests, only src/files and src/inc/utils/locks seem necessary
2229 run : docker exec -u root hashtopolis-server-dev bash -c "chown -R www-data:www-data /var/www/html/src && chmod -R g+w /var/www/html/src"
2330 - name : Run test suite
Original file line number Diff line number Diff line change 2929 sudo apt-get install npm
3030 - name : Start Hashtopolis server
3131 uses : ./.github/actions/start-hashtopolis
32+ with :
33+ db_system : " mysql"
3234 - name : Download newest apiv2 spec
3335 run : |
3436 wget http://localhost:8080/api/v2/openapi.json -P /tmp/
Original file line number Diff line number Diff line change 2626 sudo apt-get install php
2727 sudo apt-get install -y lftp
2828 sudo apt-get install nodejs
29- sudo apt-get install npm
29+ sudo apt-get install npm
3030 - name : Start Hashtopolis server
3131 uses : ./.github/actions/start-hashtopolis
32+ with :
33+ db_system : " mysql"
3234 - name : Download newest apiv2 spec
3335 run : |
3436 wget http://localhost:8080/api/v2/openapi.json -P /tmp/
You can’t perform that action at this time.
0 commit comments