Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
7904517
Create first_test_workflow.yml
irfanuylasi Jan 30, 2026
02a82a5
Update first_test_workflow.yml
irfanuylasi Jan 30, 2026
b32c841
adding initial Jenkinsfile
Feb 2, 2026
8bc38b0
added Backend unit tests
Feb 2, 2026
3c9d50c
added Backend unit tests
Feb 2, 2026
2073c2e
added Backend unit tests
Feb 2, 2026
02b6f51
added Backend unit tests go
Feb 2, 2026
96241a4
added two Jenkisfile tools and docker
Feb 2, 2026
6b6996c
added args in docker in Jenkisfile
Feb 2, 2026
3d7bd6b
added tool nodejs Jenkisfile.tools
Feb 2, 2026
be4475e
added tool nodejs Jenkisfile.tools
Feb 2, 2026
52a738f
added tool nodejs Jenkinsfile.tools
Feb 2, 2026
8333cc0
added new Jenkinsfile.parallel
Feb 2, 2026
24c6ac2
added frontend test in Jenkinsfile
Feb 2, 2026
269a77b
added caching for docker containers in Jenkinsfile
Feb 2, 2026
9404302
added caching for docker containers in Jenkinsfile
Feb 2, 2026
125a79a
added caching for docker containers in Jenkinsfile
Feb 2, 2026
2b3023c
added caching for docker containers in Jenkinsfile
Feb 2, 2026
2995eae
added cleaning workspaces after pipeline run
Feb 2, 2026
2eb0951
added cache check after pipeline run
Feb 2, 2026
e864def
added test results in Jenkinsfile
Feb 2, 2026
12e1198
update to fail a test in AddBugModalTest.tsx
Feb 3, 2026
f259c23
fix: failingl test in AddBugModalTest.tsx
Feb 3, 2026
7e7186a
add: test report for backend tests
Feb 3, 2026
6426fce
add: test report publish for backend tests
Feb 3, 2026
295f143
add: test report publish for backend tests
Feb 3, 2026
685972d
add: test report publish for backend tests
Feb 3, 2026
0fd37d3
add: test report publish for backend tests
Feb 3, 2026
8f343ac
add: code coverage report for frontend tests
Feb 3, 2026
09ad32c
add: parallel run frontend /backend unit tests
Feb 3, 2026
4c0092a
running application through jenkins
Feb 3, 2026
b7c937d
adding API tests in jenkins
Feb 3, 2026
a5f852b
adding to publish API tests results in jenkins
Feb 3, 2026
fbc3aa6
Added E2E tests
Feb 4, 2026
64c319b
Added E2E tests
Feb 4, 2026
77edf6e
adding npm config in Unit tests - Frontend tests
Feb 9, 2026
d8af45a
adding npm config timeout - API tests
Feb 9, 2026
fa1980a
adding performance tests by k6
Feb 9, 2026
8a74918
Fix Launch application timeout
Feb 9, 2026
442c9f7
update unit Tests Frontend
Feb 9, 2026
1136d5d
increase timeout unit Tests Frontend
Feb 9, 2026
4b7fa03
lifting timeout unit Tests Frontend
Feb 9, 2026
7cf261f
lifting timeout unit Tests Frontend in package.json file
Feb 9, 2026
04206fd
incrasing timeout and disable parallel test run for FrontEnd test
Feb 9, 2026
33358b5
incrasing timeout in FE test AddBugModal
Feb 9, 2026
ba26b11
incrasing timeout in FE test AddBugModal
Feb 9, 2026
ae65527
incrasing global timeout in jest
Feb 9, 2026
d1ab3bc
adding Jenkinsfile.sequential
irfanuylasi Feb 11, 2026
57766e3
Merge branch 'main' of https://github.com/irfanuylasi/bug-tracker
irfanuylasi Feb 11, 2026
8b83530
added Launch Application part in Jenkinsfile
Feb 11, 2026
020343d
updated BugList.test.tsx to wait for rendering
Feb 11, 2026
60a756c
added performance test by JMETER
Feb 11, 2026
e5a61db
added performance test by JMETER
Feb 11, 2026
5039e88
adding entrypoint to JMETER docker
Feb 11, 2026
9384952
adding entrypoint to JMETER docker container in Jenkinsfile
Feb 11, 2026
4718e3d
adding to cleanup report directory for every test run
Feb 11, 2026
b1fec31
update Jenkinsfile.jmeter-advanced with performance docker image
Feb 11, 2026
d1472da
update Jenkinsfile.jmeter-advanced with performance docker image
Feb 11, 2026
b974b33
added JMETER bulk tests
Feb 11, 2026
a66dcb9
added JMETER bulk tests
Feb 11, 2026
c55b565
added to publish K6 performance test results
Feb 11, 2026
6871d28
Running backend unit test on GH Actions
Mar 2, 2026
1483e89
Running frontend unit tests on GH Actions
Mar 2, 2026
ecdd96f
fix: Running frontend unit tests on GH Actions
Mar 2, 2026
6ef486c
Publish frontend test results
Mar 2, 2026
0103369
Publish frontend test results
Mar 2, 2026
accd17e
Publish backend test results
Mar 2, 2026
fb3b63f
fix: Publish frontend test results
Mar 2, 2026
5277bb8
fix: Publish frontend test results
Mar 2, 2026
8935cd0
fix: Publish frontend test results
Mar 2, 2026
e612618
fix: Publish Backend code coverage results
Mar 2, 2026
a17284f
Publish Frontend code coverage results
Mar 2, 2026
0ec8ef7
fix: Publish Frontend code coverage results
Mar 2, 2026
ade0c5d
fix: Publish Frontend code coverage results
Mar 2, 2026
823b2a3
fix: Publish Frontend code coverage results
Mar 2, 2026
20dae82
fix: Publish Frontend code coverage results
Mar 2, 2026
b7e8d52
Testing backend comments by PR
Mar 4, 2026
16cd016
fix: Testing backend comments by PR
Mar 4, 2026
4762cf4
fix: Testing backend comments by PR
Mar 4, 2026
69724eb
fix: Second esting backend comments by PR
Mar 4, 2026
cede366
Merge pull request #3 from irfanuylasi/TestCommentsBackends
irfanuylasi Mar 4, 2026
c2a395b
Frontend test Coverage comments by PR
Mar 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 127 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
unit-tests-backend:
runs-on: ubuntu-latest
outputs:
coverage: ${{ steps.test-backend.outputs.report }}
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
cache-dependency-path: bugtracker-backend/go.sum

- name: Install go-junit-report
run: go install github.com/jstemmer/go-junit-report/v2@latest

- name: "Execute Backend unit Tests"
id: test-backend
working-directory: ./bugtracker-backend
run: |
go test -json -coverprofile=coverage.out -covermode=atomic ./...
go tool cover -func=coverage.out > coverage.txt

echo "## Go test coverage report" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
cat coverage.txt >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY

echo "report<<EOF" >> $GITHUB_OUTPUT
cat coverage.txt >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT


go test -v ./... 2>&1 | go-junit-report > test_results.xml

- name: Publish Backend test results
uses: dorny/test-reporter@v1
if : always()
with:
name: Backend Unit Tests Report
path: bugtracker-backend/test_results.xml
reporter: jest-junit

# uses: actions/setup-go@v5
# with:
# go-version: '1.21'

# - name: Run Go tests
# run: |
# cd bugtracker-backend
# go test -v ./...
unit-tests-frontend:
runs-on: ubuntu-latest
outputs:
coverage: ${{ steps.test-frontend.outputs.report }}
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: bugtracker-frontend/package.json

- name: Execute Frontend Unit tests
id: test-frontend
working-directory: ./bugtracker-frontend
run: |
npm ci
npm test | tee full_output.txt

echo "## Frontend Test Coverage Report" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
ls -al >> $GITHUB_STEP_SUMMARY
cat full_output.txt >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY

echo "report<<EOF" >> $GITHUB_OUTPUT
cat full_output.txt >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- name: Publish Frontend Test Results
uses: dorny/test-reporter@v1
if : always()
with:
name: Frontend Unit Tests Report
path: bugtracker-frontend/test-results.xml
reporter: jest-junit
create-coverage-comment:
if: github.event_name == 'pull_request'
needs: [unit-tests-backend, unit-tests-frontend]
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Create Backend Coverage Comment
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
## Backend Test Coverage Report
```
${{ needs.unit-tests-backend.outputs.coverage }}

- name: Create Frontend Coverage Comment
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
## Frontend Test Coverage Report
```
${{ needs.unit-tests-frontend.outputs.coverage }}

```
37 changes: 37 additions & 0 deletions .github/workflows/first_test_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This is a basic workflow to help you get started with Actions

name: CI_First_workflow

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!

# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
date
2 changes: 1 addition & 1 deletion bugtracker-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"test": "jest --coverage --coverageReporters='text-summary' --coverageReporters='text' --coverageReporters='html' --reporters=default --reporters=jest-junit",
"test": "jest --testTimeout=240000 --coverage --coverageReporters='text-summary' --coverageReporters='text' --coverageReporters='html' --reporters=default --reporters=jest-junit",
"test:watch": "jest --watch",
"test:integration": "playwright test"
},
Expand Down
2 changes: 1 addition & 1 deletion bugtracker-frontend/src/components/AddBugModal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe("AddBugModal", () => {
priority: "High",
});
expect(mockOnClose).toHaveBeenCalled();
});
}, 60000);

it("should close modal when Cancel button is clicked", () => {
render(<AddBugModal {...defaultProps} />);
Expand Down
34 changes: 23 additions & 11 deletions bugtracker-frontend/src/components/BugList.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ describe("BugList", () => {

const renderAndWaitForData = async () => {
(getBugs as jest.Mock).mockResolvedValue(mockBugs);
const result = render(<BugList />);
let result;
await act(async () => {
result = render(<BugList />);
});

await waitFor(() => {
expect(screen.getByText("All Bugs")).toBeInTheDocument();
Expand All @@ -94,7 +97,9 @@ describe("BugList", () => {
.spyOn(console, "error")
.mockImplementation(() => {});
(getBugs as jest.Mock).mockRejectedValue(new Error("Failed to fetch"));
render(<BugList />);
await act(async () => {
render(<BugList />);
});
await waitFor(() => {
expect(
screen.getByText("Error: Failed to fetch bugs")
Expand Down Expand Up @@ -241,18 +246,25 @@ describe("BugList", () => {
});
});

it("displays the correct version number", () => {
render(<BugList />);
it("displays the correct version number", async () => {
await act(async () => {
render(<BugList />);
});

expect(screen.getByText(`v${APP_VERSION}`)).toBeInTheDocument();
await waitFor(() => {
expect(screen.getByText(`v${APP_VERSION}`)).toBeInTheDocument();
});
});

it("displays the version number in the header", () => {
render(<BugList />);

const header = screen.getByRole("navigation");
const versionElement = screen.getByText(`v${APP_VERSION}`);
it("displays the version number in the header", async () => {
await act(async () => {
render(<BugList />);
});

expect(header).toContainElement(versionElement);
await waitFor(() => {
const header = screen.getByRole("navigation");
const versionElement = screen.getByText(`v${APP_VERSION}`);
expect(header).toContainElement(versionElement);
});
});
});
Loading