diff --git a/.github/workflows/task-1.yaml b/.github/workflows/task-1.yaml new file mode 100644 index 0000000..07876a0 --- /dev/null +++ b/.github/workflows/task-1.yaml @@ -0,0 +1,46 @@ +name: Task 1 CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + ci: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install dependencies + run: npm ci + working-directory: task-1 + + - name: Run linter + run: npm run lint + working-directory: task-1 + + - name: Run tests + run: npm run test + working-directory: task-1 + + - name: Build project + run: npm run build + working-directory: task-1 + + - name: Zip dist + run: zip -r dist.zip dist + working-directory: task-1 + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: weather-build + path: task-1/dist.zip \ No newline at end of file diff --git a/task-1/package-lock.json b/task-1/package-lock.json index a0131d8..7fa0c7b 100644 --- a/task-1/package-lock.json +++ b/task-1/package-lock.json @@ -927,9 +927,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -947,9 +944,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -967,9 +961,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -987,9 +978,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1007,9 +995,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1027,9 +1012,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -3004,9 +2986,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -3028,9 +3007,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -3052,9 +3028,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -3076,9 +3049,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MPL-2.0", "optional": true, "os": [ 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);