From 14e5ac65ecb9879dc21a26fb3ef3f0f8f2f30ab9 Mon Sep 17 00:00:00 2001 From: Halyna Romanyshyn <30292604+halyna1995@users.noreply.github.com> Date: Wed, 8 Apr 2026 22:24:20 +0200 Subject: [PATCH] add ci file and find a linter error --- .github/workflows/ci.yml | 45 +++++++++++++++++++++++++++++ task-1/src/components/SearchBar.tsx | 1 - 2 files changed, 45 insertions(+), 1 deletion(-) 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..8f5d050 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build-test-lint: + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v6 + + - name: Set up Node.js + uses: actions/setup-node@v6 + with: + node-version: 24 + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Run linter + run: npm run lint + + - name: Run unit tests + run: npm test + + - name: Build app + run: npm run build + + - name: Zip build output + run: zip -r dist.zip dist + + - name: Upload build artifact + uses: actions/upload-artifact@v4 + with: + name: weather-app-dist + path: dist.zip + if-no-files-found: error \ No newline at end of file diff --git a/task-1/src/components/SearchBar.tsx b/task-1/src/components/SearchBar.tsx index 6574666..6579f9b 100644 --- a/task-1/src/components/SearchBar.tsx +++ b/task-1/src/components/SearchBar.tsx @@ -7,7 +7,6 @@ interface Props { export function SearchBar({ onSearch, loading }: Props) { const [value, setValue] = useState(""); - const unusedConstMaybeDeleteMe = "Search"; const handleSubmit = (e: FormEvent) => { e.preventDefault();