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
42 changes: 42 additions & 0 deletions .github/workflows/task-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on:
push:
branches: main

jobs:
ci:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Node.js

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Even the assignement is not mentioning it, it's a good practice of setting the node version. Curiosity: why 20?

uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: npm 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.

For study purposes this works well, but I would recommend the reading of npm ci and how it deffers from npm install. When working in deployed a software it could have a difference

working-directory: ./task-1

- name: Run linter
run: npm run lint
working-directory: ./task-1

- name: Run unit tests
run: npm test
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.

You can use defaults sections to define the working-directory for all steps and avoid duplication. Read this doc for more.


- name: Build the React application
run: npm run build
working-directory: ./task-1

- name: Zip the build output
run: zip -r task-1-dist.zip task-1/dist

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: build-artifact
path: task-1-dist.zip
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ The week 13 assignment for the HackYourFuture Core program can be found at the f

## Implementation Instructions
### Task 1
Add your gitHub action file in `.github/workflows/task-1.yaml` (Note: inside the existing .github folder found on the root of the repository)
Add your gitHub action file in `.github/workflows/task-1.yaml` (Note: inside the existing .github folder found on the root of the repository)

@rafasilpereira rafasilpereira Apr 15, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The only change here is removing the trailing newline at the end of the file. This was probably done by your editor automatically. You can revert it by run:

git checkout main -- README.md

86 changes: 20 additions & 66 deletions task-1/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion task-1/src/components/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down