Browse Source

chore: Update workflows

Owen Diffey 1 month ago
parent
commit
2c9a7304a7
3 changed files with 39 additions and 8 deletions
  1. 2 1
      .github/workflows/automated-tests.yml
  2. 33 0
      .github/workflows/build.yml
  3. 4 7
      .github/workflows/lint.yml

+ 2 - 1
.github/workflows/automated-tests.yml

@@ -4,7 +4,7 @@ on: [ push, pull_request, workflow_dispatch ]
 
 env:
     COMPOSE_PROJECT_NAME: musare
-    APP_ENV: production
+    APP_ENV: development
     BACKEND_HOST: 127.0.0.1
     BACKEND_PORT: 8080
     FRONTEND_HOST: 127.0.0.1
@@ -29,6 +29,7 @@ jobs:
             - name: Build Musare
               run: |
                   cp .env.example .env
+                  sed -i 's/APP_ENV=production/APP_ENV=development/g' .env
                   ./musare.sh build
             - name: Start Musare
               run: ./musare.sh start

+ 33 - 0
.github/workflows/build.yml

@@ -0,0 +1,33 @@
+name: Musare Build
+
+on: [ push, pull_request, workflow_dispatch ]
+
+env:
+    COMPOSE_PROJECT_NAME: musare
+    APP_ENV: production
+    BACKEND_HOST: 127.0.0.1
+    BACKEND_PORT: 8080
+    FRONTEND_HOST: 127.0.0.1
+    FRONTEND_PORT: 80
+    MONGO_HOST: 127.0.0.1
+    MONGO_PORT: 27017
+    MONGO_ROOT_PASSWORD: PASSWORD_HERE
+    MONGO_USER_USERNAME: musare
+    MONGO_USER_PASSWORD: OTHER_PASSWORD_HERE
+    MONGO_DATA_LOCATION: .db
+    MONGO_VERSION: 5.0
+    REDIS_HOST: 127.0.0.1
+    REDIS_PORT: 6379
+    REDIS_PASSWORD: PASSWORD
+    REDIS_DATA_LOCATION: .redis
+
+jobs:
+    build:
+        runs-on: ubuntu-latest
+        steps:
+            - uses: actions/checkout@v3
+            - name: Build Musare
+              run: |
+                  cp .env.example .env
+                  ./musare.sh build
+

+ 4 - 7
.github/workflows/build-lint.yml → .github/workflows/lint.yml

@@ -1,10 +1,10 @@
-name: Musare Build and Lint
+name: Musare Lint
 
 on: [ push, pull_request, workflow_dispatch ]
 
 env:
     COMPOSE_PROJECT_NAME: musare
-    APP_ENV: production
+    APP_ENV: development
     BACKEND_HOST: 127.0.0.1
     BACKEND_PORT: 8080
     FRONTEND_HOST: 127.0.0.1
@@ -22,24 +22,21 @@ env:
     REDIS_DATA_LOCATION: .redis
 
 jobs:
-    build-lint:
+    lint:
         runs-on: ubuntu-latest
         steps:
             - uses: actions/checkout@v3
             - name: Build Musare
               run: |
                   cp .env.example .env
+                  sed -i 's/APP_ENV=production/APP_ENV=development/g' .env
                   ./musare.sh build
             - name: Start Musare
               run: ./musare.sh start
             - name: Backend Lint
               run: ./musare.sh lint backend
-            - name: Backend Typescript
-              run: ./musare.sh typescript backend
             - name: Frontend Lint
               run: ./musare.sh lint frontend
-#            - name: Frontend Typescript
-#              run: ./musare.sh typescript frontend
             - name: Docs Lint
               run: ./musare.sh lint docs
             - name: Shell Lint