From bcd99673fddb214ac73382e60d845da3265692cc Mon Sep 17 00:00:00 2001 From: princegupta1131 <114015020+princegupta1131@users.noreply.github.com> Date: Mon, 17 Jun 2024 16:15:32 +0530 Subject: [PATCH] ED-4000 feat: Github actions instead of Jenkins-test-sonar-fix --- .github/workflows/Build.yml | 100 ++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index b36c2dd76a8..585246fb7c0 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -36,60 +36,60 @@ jobs: with: name: branch-name path: branch.txt - # Install client dependencies - - name: Install client dependencies - working-directory: src/app/client - run: yarn install --no-progress --production=true - # Build the client - - name: Build client - working-directory: src/app/client - run: npm run build - # List all files after the build - - name: List all files after build - working-directory: src/app/client - run: find . -type f - # Check if the dist directory exists and list its contents - - name: Check if dist directory exists and list contents - working-directory: src/app/client - run: | - if [ -d dist ]; then - echo "dist directory exists. Listing contents:" - ls -l dist - else - echo "dist directory does not exist" - fi - # Move index.html to index.ejs if it exists - - name: Move index.html to index.ejs if it exists - working-directory: src/app/client - run: | - if [ -f dist/index.html ]; then - mv dist/index.html dist/index.ejs - else - echo "File dist/index.html does not exist" - fi - # Set up server directories - - name: Set up server directories - run: mkdir -p $GITHUB_WORKSPACE/app_dist + # # Install client dependencies + # - name: Install client dependencies + # working-directory: src/app/client + # run: yarn install --no-progress --production=true + # # Build the client + # - name: Build client + # working-directory: src/app/client + # run: npm run build + # # List all files after the build + # - name: List all files after build + # working-directory: src/app/client + # run: find . -type f + # # Check if the dist directory exists and list its contents + # - name: Check if dist directory exists and list contents + # working-directory: src/app/client + # run: | + # if [ -d dist ]; then + # echo "dist directory exists. Listing contents:" + # ls -l dist + # else + # echo "dist directory does not exist" + # fi + # # Move index.html to index.ejs if it exists + # - name: Move index.html to index.ejs if it exists + # working-directory: src/app/client + # run: | + # if [ -f dist/index.html ]; then + # mv dist/index.html dist/index.ejs + # else + # echo "File dist/index.html does not exist" + # fi + # # Set up server directories + # - name: Set up server directories + # run: mkdir -p $GITHUB_WORKSPACE/app_dist # Copy server files to the destination directory - - name: Copy server files - run: | - cp -r src/app/libs src/app/helpers src/app/proxy src/app/resourcebundles src/app/package.json src/app/framework.config.js src/app/sunbird-plugins src/app/routes src/app/constants src/app/controllers src/app/server.js $GITHUB_WORKSPACE/app_dist/ - shell: /usr/bin/bash -e {0} + # - name: Copy server files + # run: | + # cp -r src/app/libs src/app/helpers src/app/proxy src/app/resourcebundles src/app/package.json src/app/framework.config.js src/app/sunbird-plugins src/app/routes src/app/constants src/app/controllers src/app/server.js $GITHUB_WORKSPACE/app_dist/ + # shell: /usr/bin/bash -e {0} # Install server dependencies - - name: Install server dependencies - working-directory: ${{ github.workspace }}/app_dist - run: yarn install --ignore-engines --no-progress --production=true + # - name: Install server dependencies + # working-directory: ${{ github.workspace }}/app_dist + # run: yarn install --ignore-engines --no-progress --production=true # Run server build script - - name: Run server build script - working-directory: ${{ github.workspace }}/app_dist - run: node helpers/resourceBundles/build.js -task="phraseAppPull" + # - name: Run server build script + # working-directory: ${{ github.workspace }}/app_dist + # run: node helpers/resourceBundles/build.js -task="phraseAppPull" # Execute test cases using JEST - - name: Execute test cases using JEST - working-directory: src/app/client - run: | - yarn config set ignore-engines true - yarn install - npm run test:ci + # - name: Execute test cases using JEST + # working-directory: src/app/client + # run: | + # yarn config set ignore-engines true + # yarn install + # npm run test:ci # Debug: Print the masked SONAR_TOKEN # - name: Print SONAR_TOKEN