Skip to content

Commit 4b8a663

Browse files
authored
Merge pull request #3 from iDouglasD/ci/fix-github-actions
Ci/fix github actions
2 parents 8bd3daa + 628aba6 commit 4b8a663

2 files changed

Lines changed: 50 additions & 3 deletions

File tree

.github/workflows/pr.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: PR Check
2+
3+
on:
4+
pull_request:
5+
branches: [main, development]
6+
7+
jobs:
8+
pr-check:
9+
name: PR Check
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 22
20+
21+
- name: Setup pnpm
22+
uses: pnpm/action-setup@v4
23+
with:
24+
version: 10
25+
run_install: false
26+
27+
- name: Get pnpm store directory
28+
id: pnpm-cache
29+
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
30+
31+
- name: Cache pnpm store
32+
uses: actions/cache@v4
33+
with:
34+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
35+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
36+
restore-keys: |
37+
${{ runner.os }}-pnpm-
38+
39+
- name: Install dependencies
40+
run: pnpm install --frozen-lockfile
41+
42+
- name: Lint
43+
run: pnpm lint
44+
45+
- name: Test
46+
run: pnpm test --ci
47+
48+
- name: Type check
49+
run: pnpm exec tsc --noEmit

src/__tests__/components/landing/hero.test.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ describe("Hero", () => {
1717
it("renders the heading and CTA", () => {
1818
render(<Hero />);
1919

20-
expect(
21-
screen.getByRole("heading", { level: 1 }),
22-
).toBeInTheDocument();
20+
expect(screen.getByRole("heading", { level: 1 })).toBeInTheDocument();
2321

2422
expect(
2523
screen.getByRole("button", { name: /explore your metrics/i }),

0 commit comments

Comments
 (0)