Skip to content

Commit

Permalink
fix(update) - QCMPLUS-38 : Rename the jobs to follow a consistent nam…
Browse files Browse the repository at this point in the history
…ing convention. Update job dependencies to reflect the new job names.

Signed-off-by: teklit_tewolde <[email protected]>
  • Loading branch information
teklit_tewolde authored and Teclit committed Aug 22, 2024
1 parent cfb66dd commit 7968833
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ on:

jobs:
# Step 1: Checkout code
checkout:
checkout-qcmplus:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

# Step 2: Qodana Scan
qodana:
needs: checkout
qodana-qcmplus:
needs: checkout-qcmplus
runs-on: ubuntu-latest
continue-on-error: true
permissions:
Expand All @@ -41,8 +41,8 @@ jobs:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}

# Step 3: Build Backend (qcmplus)
build-backend:
needs: [checkout, qodana]
build-qcmplusapp:
needs: [ checkout-qcmplus, qodana-qcmplus ]
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -58,8 +58,8 @@ jobs:
run: mvn -B package --file pom.xml

# Step 4: Build Frontend (qcmplus-web)
build-frontend:
needs: build-backend
build-qcmplusweb:
needs: build-qcmplusapp
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -75,9 +75,10 @@ jobs:

- name: Build
run: npm run build --prefix qcmplusweb

# Step 5: Test Backend (qcmplus)
test-backend:
needs: build-backend
test-qcmplusapp:
needs: build-qcmplusapp
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -91,8 +92,8 @@ jobs:
run: mvn test --file pom.xml

# Step 6: Test Frontend (qcmplus-web)
test-frontend:
needs: build-frontend
test-qcmplusweb:
needs: build-qcmplusweb
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -107,9 +108,9 @@ jobs:
run: npm test --prefix qcmplusweb

# Step 7: Build Docker Image and Push to Docker Hub
deploy:
deploy-qcmplus:
if: github.ref == 'refs/heads/master'
needs: [test-backend, test-frontend]
needs: [ test-qcmplusapp, test-qcmplusweb ]
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -134,4 +135,4 @@ jobs:
run: docker push teclit/qcmplus:${{ env.BRANCH_NAME }}-${{ env.COMMIT_SHA }}

- name: Push Docker image to Docker Hub with latest tag
run: docker push teclit/qcmplus:latest
run: docker push teclit/qcmplus:latest

0 comments on commit 7968833

Please sign in to comment.