Skip to content

Commit

Permalink
updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuldeep-knoldus committed Jun 13, 2024
1 parent 7c20cf8 commit d6caae0
Showing 1 changed file with 14 additions and 19 deletions.
33 changes: 14 additions & 19 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@ jobs:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Read service names from file
id: read-service-names

# Build and deploy Java services
- name: Build and deploy Java services
run: |
SERVICE_NAMES=$(cat projects-changes-deploy.txt)
echo "Service Names: $SERVICE_NAMES"
echo "::set-output name=service_names::$SERVICE_NAMES"
- name: Build and deploy Java services
run: |
for SERVICE_NAME in $(echo ${{ steps.read-service-names.outputs.service_names }} | tr ',' ' '); do
for SERVICE_NAME in $(echo $SERVICE_NAMES | tr ',' ' '); do
echo "Building and deploying $SERVICE_NAME"
# Set the build context to the root directory
Expand All @@ -42,22 +40,19 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: '21'
- name: Read service names from file
id: read-service-names
run: |
SERVICE_NAMES=$(cat projects-changes-deploy.txt)
echo "Service Names: $SERVICE_NAMES"
echo "::set-output name=service_names::$SERVICE_NAMES"

# Install dependencies and run tests for Angular projects
- name: Install dependencies and run tests for Angular projects
run: |
for SERVICE_NAME in $(echo ${{ steps.read-service-names.outputs.service_names }} | tr ',' ' '); do
echo "Processing Service: $SERVICE_NAME"
cd $SERVICE_NAME
if [ "$SERVICE_NAME" == "blogs-analyzer-ui" ]; then
npm install
npm test --code-coverage
fi
SERVICE_NAMES=$(cat projects-changes-deploy.txt)
echo "Service Names: $SERVICE_NAMES"
for SERVICE_NAME in $(echo $SERVICE_NAMES | tr ',' ' '); do
echo "Processing Service: $SERVICE_NAME"
cd $SERVICE_NAME
if [ "$SERVICE_NAME" == "blogs-analyzer-ui" ]; then
npm install
npm test --code-coverage
fi
done
sonarcloud:
name: SonarCloud Analysis
Expand Down

0 comments on commit d6caae0

Please sign in to comment.