Skip to content

Commit

Permalink
Created a reusable workflow for starting Hashtopolis server
Browse files Browse the repository at this point in the history
  • Loading branch information
jessevz committed Jan 16, 2025
1 parent 1b0bc92 commit 663847e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Start application containers
working-directory: .devcontainer
run: docker compose up -d
- name: Wait until entrypoint is finished and Hashtopolis is started
run: bash .github/scripts/await-hashtopolis-startup.sh
- name: Start Hashtopolis
uses: ./.github/workflows/start_server.yml
- name: Give Apache permissions on necessary directories # for the tests, only src/files and src/inc/utils/locks seem necessary
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"
- name: Run test suite
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,8 @@ jobs:
sudo apt-get install nodejs
sudo apt-get install npm
sudo npm i openapi-to-md -g
- name: Start application containers #same steps as in ci.yml, might make it more modular in the future
working-directory: .devcontainer
run: docker compose up -d
- name: Wait until entrypoint is finished and Hashtopolis is started
run: bash .github/scripts/await-hashtopolis-startup.sh
- name: Start Hashtopolis
uses: ./.github/workflows/start_server.yml
- name: Download newest apiv2 spec
run: |
wget http://localhost:8080/api/v2/openapi.json -P /tmp/
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/start_server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Start Hashtopolis server

on:
workflow_call:

jobs:
start-hashtopolis:
runs-on: ubbuntu-latest

steps:
- name: Start application containers
working-directory: .devcontainer
run: docker compose up -d
- name: Wait until entrypoint is finished and Hashtopolis is started
run: bash .github/scripts/await-hashtopolis-startup.sh

0 comments on commit 663847e

Please sign in to comment.