Browse Source

WIP: CI Test install

Nicolas Meienberger 3 years ago
parent
commit
33760e69bb
3 changed files with 19 additions and 3 deletions
  1. 16 0
      .github/workflows/ci.yml
  2. 2 2
      scripts/configure.sh
  3. 1 1
      scripts/start.sh

+ 16 - 0
.github/workflows/ci.yml

@@ -47,3 +47,19 @@ jobs:
       - name: Run tests
         run: pnpm -r test
 
+  test-install:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@master
+
+      - name: Install Node.js
+        uses: actions/setup-node@v3
+        with:
+          node-version: 14
+
+      - name: Create user and group
+        run: useradd -u 1000 test
+
+      - name: Run install script
+        run: sudo ./scripts/start.sh
+

+ 2 - 2
scripts/configure.sh

@@ -23,9 +23,9 @@ if ! command -v ansible-playbook > /dev/null; then
   sudo pip3 install ansible
 fi
 
+echo "Running ansible playbook setup.yml"
 
-
-ansible-playbook ansible/setup.yml -i ansible/hosts -K -e username="$USERNAME"
+ansible-playbook ansible/setup.yml -i ansible/hosts -e username="$USERNAME"
 
 # echo "Configuring permissions..."
 # echo

+ 1 - 1
scripts/start.sh

@@ -116,7 +116,7 @@ done
 mv -f "$ENV_FILE" "$ROOT_FOLDER/.env"
 mv -f "$ENV_FILE_SYSTEM_API" "$ROOT_FOLDER/packages/system-api/.env"
 
-ansible-playbook ansible/start.yml -i ansible/hosts -K -e username="$USERNAME"
+ansible-playbook ansible/start.yml -i ansible/hosts -e username="$USERNAME"
 
 # Run docker-compose
 docker-compose --env-file "${ROOT_FOLDER}/.env" up --detach --remove-orphans --build || {