From 61ed48db753545b666736121a57a117767ee259a Mon Sep 17 00:00:00 2001 From: Douglas Duarte Date: Mon, 23 Mar 2026 16:41:23 -0300 Subject: [PATCH 1/3] feat(ci): add PR check workflow with lint, test, and type check --- .github/workflows/pr.yml | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..99c653f --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,48 @@ +name: PR Check + +on: + pull_request: + branches: [main, development] + +jobs: + pr-check: + name: PR Check + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT + + - name: Cache pnpm store + uses: actions/cache@v4 + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm- + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Lint + run: pnpm lint + + - name: Test + run: pnpm test --ci + + - name: Type check + run: pnpm exec tsc --noEmit From 1d24f579180d1ddf39ab0bd87a20dbd0f5a601cd Mon Sep 17 00:00:00 2001 From: Douglas Duarte Date: Mon, 23 Mar 2026 16:42:18 -0300 Subject: [PATCH 2/3] style(tests): simplify heading expectation in Hero test --- src/__tests__/components/landing/hero.test.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/__tests__/components/landing/hero.test.tsx b/src/__tests__/components/landing/hero.test.tsx index f122daf..53f8e6a 100644 --- a/src/__tests__/components/landing/hero.test.tsx +++ b/src/__tests__/components/landing/hero.test.tsx @@ -17,9 +17,7 @@ describe("Hero", () => { it("renders the heading and CTA", () => { render(); - expect( - screen.getByRole("heading", { level: 1 }), - ).toBeInTheDocument(); + expect(screen.getByRole("heading", { level: 1 })).toBeInTheDocument(); expect( screen.getByRole("button", { name: /explore your metrics/i }), From 628aba6fcd8988bb3885aafc11b26344b12187aa Mon Sep 17 00:00:00 2001 From: Douglas Duarte Date: Mon, 23 Mar 2026 16:43:57 -0300 Subject: [PATCH 3/3] ci(pr): update pnpm version in setup step --- .github/workflows/pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 99c653f..87141d8 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -21,6 +21,7 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v4 with: + version: 10 run_install: false - name: Get pnpm store directory