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); diff --git a/task-1/task-1.yml b/task-1/task-1.yml new file mode 100644 index 0000000..6811fdd --- /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: dist/