From db0011d38a2f1dbb70098a21ced34206625f7780 Mon Sep 17 00:00:00 2001 From: thananJayan Date: Fri, 22 Dec 2023 15:16:40 +0000 Subject: [PATCH 1/3] Test --- .github/workflows/maven-test.yml | 58 ++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 21 deletions(-) diff --git a/.github/workflows/maven-test.yml b/.github/workflows/maven-test.yml index efe411c..498566b 100644 --- a/.github/workflows/maven-test.yml +++ b/.github/workflows/maven-test.yml @@ -1,23 +1,19 @@ ---- name: UI Test + on: push: - branches: - - main + branches: [ "main" ] pull_request: - branches: - - main - - + branches: [ "main" ] +permissions: + id-token: write + pages: write + jobs: build: runs-on: ubuntu-latest - concurrency: group: ${{ github.workflow }}-${{ github.ref }} - - permissions: - contents: write steps: - name: checkout of the repo @@ -26,8 +22,8 @@ jobs: - name: Set up JDK 17 uses: actions/setup-java@v3 with: - java-version: "17" - distribution: temurin + java-version: '17' + distribution: 'temurin' cache: maven - name: Docker cache @@ -39,18 +35,38 @@ jobs: - name: wait for the test containers to exit run: | - chmod a+x wait_for_exit.sh - ./wait_for_exit.sh app_test + chmod a+x wait_for_exit.sh + ./wait_for_exit.sh app_test shell: bash + #- name: Deploy the test output + # uses: peaceiris/actions-gh-pages@v3 + # if: github.ref == 'refs/heads/main' + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # publish_dir: ./output/reports + - name: Stop the grid setup if: always() run: | - docker-compose -f "docker-compose.yml" down + docker-compose -f "docker-compose.yml" down - - name: Deploy the html result - uses: peaceiris/actions-gh-pages@v3 - if: github.ref == 'refs/heads/main' + - name: Setup Pages + uses: actions/configure-pages@v4 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./output/reports \ No newline at end of file + # Upload entire repository + path: './output/reports ' + deploy: + needs: build + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v3 \ No newline at end of file From 4be08f46c6c3d88717f66096b0c7b5365656ae93 Mon Sep 17 00:00:00 2001 From: thananJayan Date: Fri, 22 Dec 2023 15:33:27 +0000 Subject: [PATCH 2/3] Using the old upload artifact --- .github/workflows/maven-test.yml | 33 ++++++++------------------------ 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/.github/workflows/maven-test.yml b/.github/workflows/maven-test.yml index 498566b..19cc659 100644 --- a/.github/workflows/maven-test.yml +++ b/.github/workflows/maven-test.yml @@ -5,6 +5,7 @@ on: branches: [ "main" ] pull_request: branches: [ "main" ] + permissions: id-token: write pages: write @@ -39,34 +40,16 @@ jobs: ./wait_for_exit.sh app_test shell: bash - #- name: Deploy the test output - # uses: peaceiris/actions-gh-pages@v3 - # if: github.ref == 'refs/heads/main' - # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - # publish_dir: ./output/reports + - name: Deploy the test output + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/main' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./output/reports - name: Stop the grid setup if: always() run: | docker-compose -f "docker-compose.yml" down - - name: Setup Pages - uses: actions/configure-pages@v4 - - - name: Upload artifact - uses: actions/upload-pages-artifact@v2 - with: - # Upload entire repository - path: './output/reports ' - deploy: - needs: build - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v3 \ No newline at end of file + \ No newline at end of file From f9b60dce2d0eb60d30b80c93f98c55e7d40e09b8 Mon Sep 17 00:00:00 2001 From: thananJayan Date: Fri, 22 Dec 2023 15:34:12 +0000 Subject: [PATCH 3/3] Updated --- .github/workflows/maven-test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/maven-test.yml b/.github/workflows/maven-test.yml index 19cc659..7c8b2fd 100644 --- a/.github/workflows/maven-test.yml +++ b/.github/workflows/maven-test.yml @@ -5,7 +5,7 @@ on: branches: [ "main" ] pull_request: branches: [ "main" ] - + permissions: id-token: write pages: write @@ -41,11 +41,11 @@ jobs: shell: bash - name: Deploy the test output - uses: peaceiris/actions-gh-pages@v3 - if: github.ref == 'refs/heads/main' - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./output/reports + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/main' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./output/reports - name: Stop the grid setup if: always()