Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/task-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Integration

on:
push:
branches:
- main
pull_request:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goog thing on leaving this in the PR level. As you can see in the PR, I ran it and it run succesfully. But it was the first time that it run. How did you test your developments?

branches:
- main

jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./task-1
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good use on default folder! This avoid duplication of text in other steps!

steps:
- name: Check out code
uses: actions/checkout@v6

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "24" # Can also use 'latest'

- name: Install dependencies
run: npm install # npm clean install
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that one of your commits you changed from npm ci to npm install. What made you make this change? I recommend read npm ci docs


- name: Run Linter
run: npm run lint

- name: Run Unit Tests
run: npm test # Run vitest tests (defined in package.json

- name: Build the React application
run: npm run build

- name: Compress build
uses: montudor/action-zip@v1
with:
args: zip -qq -r dist.zip task-1/dist

- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: |
dist.zip
3 changes: 1 addition & 2 deletions task-1/src/components/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading