From 2333361356ad8513853cd9686972c1e34f4e9c00 Mon Sep 17 00:00:00 2001 From: NucleusHQ Date: Sun, 16 Jun 2024 13:00:34 +0530 Subject: [PATCH 1/5] Deliberately failing a test case --- app/counter.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/counter.test.tsx b/app/counter.test.tsx index 8488296a..2d3b111c 100644 --- a/app/counter.test.tsx +++ b/app/counter.test.tsx @@ -8,5 +8,5 @@ it("App Router: Works with Client Components (React State)", () => { render(); expect(screen.getByRole("heading")).toHaveTextContent("0"); fireEvent.click(screen.getByRole("button")); - expect(screen.getByRole("heading")).toHaveTextContent("1"); + expect(screen.getByRole("heading")).toHaveTextContent("11"); }); From b07cff1b298ccb75724f895a4061f71b12446b58 Mon Sep 17 00:00:00 2001 From: NucleusHQ Date: Sun, 16 Jun 2024 13:09:07 +0530 Subject: [PATCH 2/5] Fixed test case --- app/counter.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/counter.test.tsx b/app/counter.test.tsx index 2d3b111c..8488296a 100644 --- a/app/counter.test.tsx +++ b/app/counter.test.tsx @@ -8,5 +8,5 @@ it("App Router: Works with Client Components (React State)", () => { render(); expect(screen.getByRole("heading")).toHaveTextContent("0"); fireEvent.click(screen.getByRole("button")); - expect(screen.getByRole("heading")).toHaveTextContent("11"); + expect(screen.getByRole("heading")).toHaveTextContent("1"); }); From 038a80b892543e6b5c8db7b404b67825eda070ad Mon Sep 17 00:00:00 2001 From: NucleusHQ Date: Sun, 16 Jun 2024 16:19:46 +0530 Subject: [PATCH 3/5] Deploy yml file written --- .github/workflows/deploy.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..9b59f613 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,18 @@ + +name: Deploy + +on: + push: + branches: [ "main" ] + +jobs: + deploy: + + runs-on: ubuntu-latest + + + steps: + - uses: actions/checkout@v4 + - run: docker build . -t harishneel/next-js-app + - echo "${{secrets.DOCKERHUB_PASSWORD}}" | docker login -u ${{secrets.DOCKERHUB_USERNAME}} --password-stdin + - run: docker push harishneel/next-js-app:latest \ No newline at end of file From bf05a4cbb125cea24beef0308ad3c00a2ab2e2a8 Mon Sep 17 00:00:00 2001 From: NucleusHQ Date: Sun, 16 Jun 2024 16:25:14 +0530 Subject: [PATCH 4/5] Deploy yml file is added --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9b59f613..35fe7716 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,5 +14,5 @@ jobs: steps: - uses: actions/checkout@v4 - run: docker build . -t harishneel/next-js-app - - echo "${{secrets.DOCKERHUB_PASSWORD}}" | docker login -u ${{secrets.DOCKERHUB_USERNAME}} --password-stdin + - run: echo "${{secrets.DOCKERHUB_PASSWORD}}" | docker login -u ${{secrets.DOCKERHUB_USERNAME}} --password-stdin - run: docker push harishneel/next-js-app:latest \ No newline at end of file From 55399c38a72e806105f22a14acc0e7fe1c7c4915 Mon Sep 17 00:00:00 2001 From: shivam khantwal Date: Mon, 17 Nov 2025 14:04:17 +0530 Subject: [PATCH 5/5] written workfolow for integration --- .github/workflows/integration.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 8a2fa081..9deef1a2 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -1,3 +1,5 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs name: Integration @@ -15,20 +17,19 @@ jobs: strategy: matrix: node-version: [18.x, 20.x, 22.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'npm' - - name: "Installing Dependencies" - run: npm i - - - name: "Build command" - run: npm run build + - run: npm i + - run: npm run build + unit-tests: runs-on: ubuntu-latest @@ -36,16 +37,14 @@ jobs: strategy: matrix: node-version: [18.x, 20.x, 22.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'npm' - - name: "Installing Dependencies" - run: npm i - - - name: "Running test cases" - run: npm run test \ No newline at end of file + - run: npm test + \ No newline at end of file