Skip to content

Commit

Permalink
feat: add Vitest \& CI/CD Pipeline and Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
drondiodev committed Jul 22, 2024
1 parent e250f45 commit bf0ef40
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/run-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI workflow
on: push

jobs:
run-linter-and-tests:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install pnpm
run: npm install -g pnpm

- name: Install dependencies
run: pnpm install

- name: Lint code
run: pnpm run lint

- name: Run tests
run: pnpm test
4 changes: 3 additions & 1 deletion app/page.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ import Page from './page'

test('Page', () => {
render(<Page />)
expect(screen.getByRole('heading', { level: 1, name: 'Home' })).toBeDefined()
expect(
screen.getByRole('heading', { level: 1, name: 'Next.js Starter template' })
).toBeDefined()
})

0 comments on commit bf0ef40

Please sign in to comment.