tests: test process on github and husky

This commit is contained in:
Rafael Taranto 2025-05-22 10:33:40 +01:00
parent 23e1b30e65
commit d73bb88f1d
2 changed files with 31 additions and 0 deletions

26
.github/workflows/test.yml vendored Normal file
View file

@ -0,0 +1,26 @@
name: Tests
on:
pull_request:
branches: [ dev ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run admin-ui tests
working-directory: packages/admin-ui
run: npm run test:run

View file

@ -1,4 +1,9 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
# Run tests first
echo "Running tests..."
npm run test:run --workspace=packages/admin-ui
# Run linting
npx lint-staged