From 57c34deeae6db4d1c13cfabd1c2e3903a8871c66 Mon Sep 17 00:00:00 2001 From: demuelle Date: Tue, 8 Apr 2025 09:45:57 -0500 Subject: [PATCH 1/6] removes todo --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 86e87472..b36556c1 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,6 @@ GitHub Actions is a great solution to this problem. For example, you could creat ## Initial Project Setup -TODO: this definitely doesn't work To begin, start by forking the following repository [GitHub Actions Demo](https://github.com/coding-boot-camp/github-actions-demo). Once you have forked this repository you should then clone the forked repository to your local machine. ## Create the Workflow From dea2869ffa8dea0a03fb1f6130ccb92d02653a04 Mon Sep 17 00:00:00 2001 From: Carmen Wheeler Date: Tue, 8 Apr 2025 18:22:05 -0500 Subject: [PATCH 2/6] created github dir, workflows and main.yml --- .github/workflows/main.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..e69de29b From fc9cca36de9b7c3e05cdb1f10e75d92bc64899fb Mon Sep 17 00:00:00 2001 From: Carmen Wheeler Date: Tue, 8 Apr 2025 18:40:45 -0500 Subject: [PATCH 3/6] added yml code --- .github/workflows/main.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e69de29b..7be38efc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -0,0 +1,35 @@ + ```yml + # Name of workflow + name: Lint workflow + + # Trigger workflow on all pull requests + on: + pull_request: + branches: + - develop + - staging + + # Jobs to carry out + jobs: + test: + # Operating system to run job on + runs-on: ubuntu-latest + + # Steps in job + steps: + # Get code from repo + - name: Checkout code + uses: actions/checkout@v1 + + - name: Use Node.js 21.x + uses: actions/setup-node@v1 + with: + node-version: 21.x + + # Install dependencies + - name: 🧰 install deps + run: npm install + + # Run lint + - name: Run lint + run: npm run lint \ No newline at end of file From d233060c8bc53a34a4312ca4f7467cf534ca0182 Mon Sep 17 00:00:00 2001 From: Carmen Wheeler Date: Tue, 8 Apr 2025 19:10:36 -0500 Subject: [PATCH 4/6] updated mainyml --- .github/workflows/main.yml | 69 +++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7be38efc..b3b8e8b6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,35 +1,34 @@ - ```yml - # Name of workflow - name: Lint workflow - - # Trigger workflow on all pull requests - on: - pull_request: - branches: - - develop - - staging - - # Jobs to carry out - jobs: - test: - # Operating system to run job on - runs-on: ubuntu-latest - - # Steps in job - steps: - # Get code from repo - - name: Checkout code - uses: actions/checkout@v1 - - - name: Use Node.js 21.x - uses: actions/setup-node@v1 - with: - node-version: 21.x - - # Install dependencies - - name: 🧰 install deps - run: npm install - - # Run lint - - name: Run lint - run: npm run lint \ No newline at end of file +{ + "name": "Lint workflow", + "on": { + "pull_request": { + "branches": ["develop", "staging"] + } + }, + "jobs": { + "test": { + "runs-on": "ubuntu-latest", + "steps": [ + { + "name": "Checkout code", + "uses": "actions/checkout@v1" + }, + { + "name": "Use Node.js 21.x", + "uses": "actions/setup-node@v1", + "with": { + "node-version": "21.x" + } + }, + { + "name": "🧰 install deps", + "run": "npm install" + }, + { + "name": "Run lint", + "run": "npm run lint" + } + ] + } + } +} \ No newline at end of file From 4fbb41a3f25dd5a6a0cc8d73a99674399f5d70fe Mon Sep 17 00:00:00 2001 From: Carmen Wheeler Date: Tue, 8 Apr 2025 19:56:35 -0500 Subject: [PATCH 5/6] resolved lint error --- src/components/Advertisement.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Advertisement.tsx b/src/components/Advertisement.tsx index 2181f6aa..eb7a6a77 100644 --- a/src/components/Advertisement.tsx +++ b/src/components/Advertisement.tsx @@ -11,7 +11,7 @@ function Advertisement(props: AdvertisementProps) {

{props.productDescription}

{props.price}

- ); + ) } export default Advertisement; From feffa637cf6ad6e9d8e3a2e9e08e157fd4adcfd6 Mon Sep 17 00:00:00 2001 From: Carmen Wheeler Date: Tue, 8 Apr 2025 20:09:57 -0500 Subject: [PATCH 6/6] removed semi colon --- src/components/Advertisement.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Advertisement.tsx b/src/components/Advertisement.tsx index eb7a6a77..bb55bcb2 100644 --- a/src/components/Advertisement.tsx +++ b/src/components/Advertisement.tsx @@ -2,7 +2,7 @@ interface AdvertisementProps { companyName: string; productDescription: string; price: string; -}; +} function Advertisement(props: AdvertisementProps) { return ( @@ -11,7 +11,7 @@ function Advertisement(props: AdvertisementProps) {

{props.productDescription}

{props.price}

- ) + ); } export default Advertisement;