diff --git a/.github/workflows/task-1.yaml b/.github/workflows/task-1.yaml new file mode 100644 index 0000000..b12a7f3 --- /dev/null +++ b/.github/workflows/task-1.yaml @@ -0,0 +1,50 @@ +name: CI Pipeline + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: task-1/package-lock.json + + - name: Install dependencies + working-directory: task-1 + run: npm ci + + - name: Run linter + working-directory: task-1 + run: npm run lint + + - name: Run unit tests + working-directory: task-1 + run: npm test + + - name: Build application + working-directory: task-1 + run: npm run build + + - name: Zip build output + working-directory: task-1 + run: zip -r dist.zip dist + + - name: Upload build artifact + uses: actions/upload-artifact@v4 + with: + name: build-artifact + path: task-1/dist.zip \ 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();