From 880b432e2d6530bf428c7691ba3a4e23b10c60ff Mon Sep 17 00:00:00 2001 From: claudiocoder Date: Sun, 2 Jun 2024 16:15:06 -0600 Subject: [PATCH 01/10] :sparkles: - Add github workflows --- .github/workflows/github-actions-demo.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/github-actions-demo.yml diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml new file mode 100644 index 0000000..0eb7126 --- /dev/null +++ b/.github/workflows/github-actions-demo.yml @@ -0,0 +1,18 @@ +name: GitHub Actions Demo +run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 +on: [push] +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." From 099e9e4870b3ff0726eb9c0a8ead2cd207a304ca Mon Sep 17 00:00:00 2001 From: claudiocoder Date: Sun, 2 Jun 2024 16:37:09 -0600 Subject: [PATCH 02/10] :sparkles: - Add github workflows --- .github/workflows/github-actions-demo.yml | 18 ------------------ .github/workflows/ui.yml | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 18 deletions(-) delete mode 100644 .github/workflows/github-actions-demo.yml create mode 100644 .github/workflows/ui.yml diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml deleted file mode 100644 index 0eb7126..0000000 --- a/.github/workflows/github-actions-demo.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: GitHub Actions Demo -run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 -on: [push] -jobs: - Explore-GitHub-Actions: - runs-on: ubuntu-latest - steps: - - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - name: Check out repository code - uses: actions/checkout@v4 - - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." - - run: echo "🖥️ The workflow is now ready to test your code on the runner." - - name: List files in the repository - run: | - ls ${{ github.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml new file mode 100644 index 0000000..a15b46c --- /dev/null +++ b/.github/workflows/ui.yml @@ -0,0 +1,21 @@ +name: UI-claudio-coder page +on: [push] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + - name: Install dependencies + - run: npm ci + - name: Build + - run: npm run build + - name: Linters + - run: npm run lint + - name: Format Code + - run: npm run format --check + - name: Unit Test + - run: npm run test:coverage From 27ac5df2514917f8dea8ebfdce84fe111d59a881 Mon Sep 17 00:00:00 2001 From: claudiocoder Date: Sun, 2 Jun 2024 16:39:54 -0600 Subject: [PATCH 03/10] :sparkles: - Add github workflows --- .github/workflows/ui.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml index a15b46c..975a666 100644 --- a/.github/workflows/ui.yml +++ b/.github/workflows/ui.yml @@ -1,4 +1,5 @@ name: UI-claudio-coder page +run-name: ${{github.actor}} is running UI-claudio-coder on: [push] jobs: build: From cf967d7fc408492037ba52edebeff559fac6a56e Mon Sep 17 00:00:00 2001 From: claudiocoder Date: Sun, 2 Jun 2024 16:45:15 -0600 Subject: [PATCH 04/10] :sparkles: - Add github workflows --- .github/workflows/ui.yml | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml index 975a666..b0de95d 100644 --- a/.github/workflows/ui.yml +++ b/.github/workflows/ui.yml @@ -5,18 +5,25 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: '20.x' - - name: Install dependencies - - run: npm ci - - name: Build - - run: npm run build - - name: Linters - - run: npm run lint - - name: Format Code - - run: npm run format --check - - name: Unit Test - - run: npm run test:coverage + uses: actions/checkout@v4 + + name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + + name: Install dependencies + run: npm ci + + name: Build + run: npm run Build + + name: Linters + run: npm run lint + + name: Format Code + run: npm run format --check + + name: Unit Test + run: npm run test:coverage + From 990fcfffc272969739a1b7bc056dd221e6181d64 Mon Sep 17 00:00:00 2001 From: claudiocoder Date: Sun, 2 Jun 2024 16:49:12 -0600 Subject: [PATCH 05/10] :sparkles: - Add github workflows --- .github/workflows/ui.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml index b0de95d..b56a187 100644 --- a/.github/workflows/ui.yml +++ b/.github/workflows/ui.yml @@ -5,25 +5,25 @@ jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: '20.x' + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' - name: Install dependencies - run: npm ci + - name: Install dependencies + run: npm ci - name: Build - run: npm run Build + - name: Build + run: npm run Build - name: Linters - run: npm run lint + - name: Linters + run: npm run lint - name: Format Code - run: npm run format --check + - name: Format Code + run: npm run format --check - name: Unit Test - run: npm run test:coverage + - name: Unit Test + run: npm run test:coverage From 4d0057ae5c647be6b066f0e00ec12f4ea6393288 Mon Sep 17 00:00:00 2001 From: claudiocoder Date: Sun, 2 Jun 2024 16:50:59 -0600 Subject: [PATCH 06/10] :sparkles: - Add github workflows --- .github/workflows/ui.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml index b56a187..937c58c 100644 --- a/.github/workflows/ui.yml +++ b/.github/workflows/ui.yml @@ -16,7 +16,7 @@ jobs: run: npm ci - name: Build - run: npm run Build + run: npm run build - name: Linters run: npm run lint From 56341b8958eab7421bd7559d690cf18f779a65c2 Mon Sep 17 00:00:00 2001 From: claudiocoder Date: Sun, 2 Jun 2024 16:56:14 -0600 Subject: [PATCH 07/10] :sparkles: - Add github workflows --- .github/workflows/ui.yml | 57 ++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml index 937c58c..2d6853a 100644 --- a/.github/workflows/ui.yml +++ b/.github/workflows/ui.yml @@ -1,29 +1,28 @@ -name: UI-claudio-coder page -run-name: ${{github.actor}} is running UI-claudio-coder -on: [push] -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: '20.x' - - - name: Install dependencies - run: npm ci - - - name: Build - run: npm run build - - - name: Linters - run: npm run lint - - - name: Format Code - run: npm run format --check - - - name: Unit Test - run: npm run test:coverage - +name: UI-claudio-coder page +run-name: ${{github.actor}} is running UI-claudio-coder +on: [push] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Linters + run: npm run lint + + - name: Format Code + run: npm run format + + - name: Unit Test + run: npm run test:coverage From e0474c4b8be92eb6d47dac60e35a23d85d876582 Mon Sep 17 00:00:00 2001 From: claudiocoder Date: Sun, 2 Jun 2024 17:00:28 -0600 Subject: [PATCH 08/10] :sparkles: - Add github workflows --- .github/workflows/ui.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml index 2d6853a..a364bd6 100644 --- a/.github/workflows/ui.yml +++ b/.github/workflows/ui.yml @@ -1,8 +1,14 @@ name: UI-claudio-coder page run-name: ${{github.actor}} is running UI-claudio-coder -on: [push] +on: + push: + branches: + - main + pull_request: + branches: + - main jobs: - build: + UI-claudio-coder: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 3b76042085b8478a6d165aa2b13b4f236c22bb5f Mon Sep 17 00:00:00 2001 From: claudiocoder Date: Sun, 2 Jun 2024 17:40:15 -0600 Subject: [PATCH 09/10] :green_heart: - Add UI github actions --- .github/workflows/ui.yml | 5 ++++- vitest.config.ts | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml index a364bd6..165ccc2 100644 --- a/.github/workflows/ui.yml +++ b/.github/workflows/ui.yml @@ -31,4 +31,7 @@ jobs: run: npm run format - name: Unit Test - run: npm run test:coverage + run: npm run test --coverage.enabled true + + - name: 'Report Coverage' + uses: davelosert/vitest-coverage-report-action@v2 diff --git a/vitest.config.ts b/vitest.config.ts index 9894732..9f4d320 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -24,6 +24,7 @@ export default defineConfig({ environment: 'jsdom', coverage: { provider: 'v8', + reporter: ['text', 'json-summary', 'json'], exclude: [ 'vitest.config.ts', '**/*.config.*', @@ -31,6 +32,12 @@ export default defineConfig({ '__mocks__', ...coverageConfigDefaults.exclude, ], + thresholds: { + lines: 80, + branches: 80, + functions: 80, + statements: 80, + }, }, setupFiles: ['vitest.setup.ts'], watch: false, From 23611cf131950c85800df2bdbd01b7575c1675c4 Mon Sep 17 00:00:00 2001 From: claudiocoder Date: Sun, 2 Jun 2024 17:50:55 -0600 Subject: [PATCH 10/10] :green_heart: - Add UI github actions --- .github/workflows/ui.yml | 2 +- package.json | 2 +- vitest.config.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml index 165ccc2..d0a8145 100644 --- a/.github/workflows/ui.yml +++ b/.github/workflows/ui.yml @@ -31,7 +31,7 @@ jobs: run: npm run format - name: Unit Test - run: npm run test --coverage.enabled true + run: npm run test:coverage - name: 'Report Coverage' uses: davelosert/vitest-coverage-report-action@v2 diff --git a/package.json b/package.json index d9f6c19..3d87a4f 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "format": "prettier --check .", "format:fix": "prettier --write .", "test": "vitest", - "test:coverage": "vitest --coverage" + "test:coverage": "vitest --coverage.enabled true" }, "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.5.1", diff --git a/vitest.config.ts b/vitest.config.ts index 9f4d320..6460f1f 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -24,7 +24,7 @@ export default defineConfig({ environment: 'jsdom', coverage: { provider: 'v8', - reporter: ['text', 'json-summary', 'json'], + reporter: ['text', 'html', 'clover', 'json-summary', 'json'], exclude: [ 'vitest.config.ts', '**/*.config.*',