From 7d3d040b696a49201eb67d778b8a57efaf4fc6fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Junior?= <77794636+kwaark@users.noreply.github.com> Date: Wed, 17 May 2023 20:14:39 -0300 Subject: [PATCH 1/8] Create CI.yml --- .github/workflows/CI.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/CI.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..866dece --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,35 @@ +name: CI + +on: + pull_request: + branches: [ "main" ] + + workflow_dispatch: + +jobs: + Ci: + runs-on: ubuntu-latest + + steps: + + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Node.js 16.x + uses: actions/setup-node@v3 + with: + node-version: 16.x + + - name: Install dependencies + run: npm install + + - name: Run the tests + run: npm run test -- --coverage + env: + CI: true + + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From 47e65118e8448e169a379fba0232bfbe813b5dba Mon Sep 17 00:00:00 2001 From: Victor Date: Wed, 17 May 2023 20:36:37 -0300 Subject: [PATCH 2/8] Update CI.yml --- .github/workflows/CI.yml | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 866dece..035eff1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -5,31 +5,51 @@ on: branches: [ "main" ] workflow_dispatch: - + jobs: - Ci: + stats: + name: PR Stats runs-on: ubuntu-latest steps: - + - name: Checkout repository uses: actions/checkout@v3 - + - name: Set up Node.js 16.x uses: actions/setup-node@v3 with: node-version: 16.x - + - name: Install dependencies run: npm install - + - name: Run the tests run: npm run test -- --coverage env: CI: true - + - name: SonarCloud Scan uses: SonarSource/sonarcloud-github-action@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + - name: Setup Pages + + uses: actions/configure-pages@v3 + + + - name: Upload artifact + + uses: actions/upload-pages-artifact@v1 + + with: + + path: 'build' + + + - name: Deploy to GitHub Pages + + id: deployment + + uses: actions/deploy-pages@v2 From f07c884be87867d7db60e9cc64b57963eb554ea1 Mon Sep 17 00:00:00 2001 From: Victor Date: Wed, 17 May 2023 20:45:50 -0300 Subject: [PATCH 3/8] Create workflowsCD.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adição da pasta CD --- .github/workflowsCD.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/workflowsCD.yml diff --git a/.github/workflowsCD.yml b/.github/workflowsCD.yml new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.github/workflowsCD.yml @@ -0,0 +1 @@ + From 61af7afb7fdda2a5f2cc211bbbb6729a4bf2db2c Mon Sep 17 00:00:00 2001 From: Victor Date: Wed, 17 May 2023 20:46:09 -0300 Subject: [PATCH 4/8] Rename workflowsCD.yml to CD.yml --- .github/{workflowsCD.yml => CD.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{workflowsCD.yml => CD.yml} (100%) diff --git a/.github/workflowsCD.yml b/.github/CD.yml similarity index 100% rename from .github/workflowsCD.yml rename to .github/CD.yml From 7b8778db4e18a1bd412779fcec2b2a019b56ae72 Mon Sep 17 00:00:00 2001 From: Victor Date: Wed, 17 May 2023 20:46:28 -0300 Subject: [PATCH 5/8] Delete CD.yml --- .github/CD.yml | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .github/CD.yml diff --git a/.github/CD.yml b/.github/CD.yml deleted file mode 100644 index 8b13789..0000000 --- a/.github/CD.yml +++ /dev/null @@ -1 +0,0 @@ - From 0b0ed6561f3a7cbbff8ff74cc54385ede97b35e1 Mon Sep 17 00:00:00 2001 From: Victor Date: Wed, 17 May 2023 20:46:49 -0300 Subject: [PATCH 6/8] Create CD.yml --- .github/workflows/CD.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/workflows/CD.yml diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.github/workflows/CD.yml @@ -0,0 +1 @@ + From c2b79ba4e4eedf19be952724b5439f554852a407 Mon Sep 17 00:00:00 2001 From: Victor Date: Wed, 17 May 2023 20:52:49 -0300 Subject: [PATCH 7/8] Update CD.yml --- .github/workflows/CD.yml | 77 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 8b13789..fd7eca9 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -1 +1,78 @@ +name: CD +on: +  pull_request: +    branches: [ "main" ] + +  workflow_dispatch: + +jobs: +  stats: +    name: PR Stats +    runs-on: ubuntu-latest + +    steps: + +  + +      - name: Checkout repository +        uses: actions/checkout@v3 + +  + +      - name: Set up Node.js 16.x +        uses: actions/setup-node@v3 +        with: +          node-version: 16.x + +  + +      - name: Install dependencies +        run: npm install + +  + +      - name: Run the tests +        run: npm run test -- --coverage +        env: +          CI: true + +  + +      - name: SonarCloud Scan +        uses: SonarSource/sonarcloud-github-action@master +        env: +          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} +      - name: Setup Pages + +  + +        uses: actions/configure-pages@v3 + +  + + +      - name: Upload artifact + +  + +        uses: actions/upload-pages-artifact@v1 + +  + +        with: + +  + +          path: 'pre-hackathon-devops-grupo1/src' + +      - name: Deploy to GitHub Pages + +  + +        id: deployment + +  + +        uses: actions/deploy-pages@v2 From bfb97446e900d49b77d93dc0ba162de16e9b4b85 Mon Sep 17 00:00:00 2001 From: Victor Date: Wed, 17 May 2023 20:53:48 -0300 Subject: [PATCH 8/8] Update CD.yml --- .github/workflows/CD.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index fd7eca9..46c19a4 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -13,8 +13,6 @@ jobs:     steps: -  -       - name: Checkout repository         uses: actions/checkout@v3