From 4ac586bb255a6e9e42d770d22e6689af6a7b3881 Mon Sep 17 00:00:00 2001 From: Jawad Al Bdiwi Date: Wed, 8 Apr 2026 19:56:02 +0200 Subject: [PATCH 1/3] Create CI pipeline GitHub action --- task-1/task-1.yml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 task-1/task-1.yml diff --git a/task-1/task-1.yml b/task-1/task-1.yml new file mode 100644 index 0000000..e561286 --- /dev/null +++ b/task-1/task-1.yml @@ -0,0 +1,41 @@ +name: task-1 pipeline +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + ci-pipeline: + runs-on: ubuntu-latest + defaults: + run: + working-directory: task-1 + steps: + - uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install dependencies + run: npm install + + - name: Lint + run: npm run lint + + - name: Test + run: npm test + + - name: Build + run: npm run build + + - name: Compress build artifact + run: zip -r build-artifact.zip dist/ + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: build-artifact + path: build-artifact.zip From d46e47ea0689ed53ff45b7edbbe7c4c5195171cc Mon Sep 17 00:00:00 2001 From: Jawad Al Bdiwi Date: Wed, 8 Apr 2026 19:56:18 +0200 Subject: [PATCH 2/3] Remove unused search function --- task-1/src/components/SearchBar.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/task-1/src/components/SearchBar.tsx b/task-1/src/components/SearchBar.tsx index 6574666..c633460 100644 --- a/task-1/src/components/SearchBar.tsx +++ b/task-1/src/components/SearchBar.tsx @@ -7,8 +7,7 @@ interface Props { export function SearchBar({ onSearch, loading }: Props) { const [value, setValue] = useState(""); - const unusedConstMaybeDeleteMe = "Search"; - + const handleSubmit = (e: FormEvent) => { e.preventDefault(); if (value.trim()) onSearch(value); From c0412b11440d44454d94a265432c3719d85d49ce Mon Sep 17 00:00:00 2001 From: Jawad Al Bdiwi Date: Wed, 8 Apr 2026 20:03:30 +0200 Subject: [PATCH 3/3] Corrected artifact build path --- task-1/task-1.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/task-1/task-1.yml b/task-1/task-1.yml index e561286..6811fdd 100644 --- a/task-1/task-1.yml +++ b/task-1/task-1.yml @@ -38,4 +38,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: build-artifact - path: build-artifact.zip + path: dist/