Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Setup Node + pnpm
description: Install pnpm, setup Node.js with pnpm cache, and install deps
runs:
using: composite
steps:
- name: Setup pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
with:
version: 10.18.3

- name: Setup Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: 22
cache: pnpm

- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
40 changes: 40 additions & 0 deletions .github/workflows/security-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Security Checks

on:
push:
branches: ["**"]
pull_request:
branches: ["**"]

permissions:
contents: read
jobs:
trivy:
name: Trivy
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5

- name: Scan repo
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8 # 0.33.1
with:
scan-type: 'fs'
scan-ref: '.'
scanners: 'vuln,secret,config'
exit-code: '1'
ignore-unfixed: 'true'
severity: 'MEDIUM,HIGH,CRITICAL'

npm-audit:
name: PNPM Audit
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5

- name: Setup
uses: ./.github/actions/setup

- name: Run pnpm audit
run: pnpm audit --prod --audit-level=moderate
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test

on:
push:
branches: ["**"]
pull_request:
branches: ["**"]

permissions:
contents: read

jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Setup
uses: ./.github/actions/setup

- name: Run tests
run: pnpm test --run
10 changes: 10 additions & 0 deletions __tests__/page.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { expect, test } from 'vitest'
import { render, screen } from '@testing-library/react'
import Home from '../src/app/page'

test('Home page', () => {
render(<Home />)
expect(
screen.getByRole('heading', { level: 1, name: /To get started, edit the page.tsx file./i })
).toBeDefined()
})
12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
"name": "toolhive-cloud-ui",
"version": "0.1.0",
"private": true,
"packageManager": "pnpm@10.18.3",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "biome check",
"format": "biome format --write"
"format": "biome format --write",
"test": "vitest"
},
"dependencies": {
"next": "16.0.2",
Expand All @@ -17,11 +19,17 @@
"devDependencies": {
"@biomejs/biome": "2.3.5",
"@tailwindcss/postcss": "^4",
"@testing-library/dom": "^10.4.1",
"@testing-library/react": "^16.3.0",
"@types/node": "^24.0.0",
"@types/react": "^19",
"@types/react-dom": "^19",
"@vitejs/plugin-react": "^5.1.1",
"babel-plugin-react-compiler": "1.0.0",
"jsdom": "^27.2.0",
"tailwindcss": "^4",
"typescript": "^5"
"typescript": "^5",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "^4.0.8"
}
}
Loading