v1.1.0: pooled runtime, 959 tests, production hardening (0 squash)
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: https://gitea.com/actions/checkout@v4
|
||||
- uses: https://gitea.com/actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- run: npm run lint
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: https://gitea.com/actions/checkout@v4
|
||||
- uses: https://gitea.com/actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- run: npm run typecheck
|
||||
- uses: https://gitea.com/actions/upload-artifact@v4
|
||||
with:
|
||||
name: dist
|
||||
path: |
|
||||
packages/*/dist
|
||||
packages/*/tsconfig.tsbuildinfo
|
||||
|
||||
unit:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [18, 20, 22]
|
||||
steps:
|
||||
- uses: https://gitea.com/actions/checkout@v4
|
||||
- uses: https://gitea.com/actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- uses: https://gitea.com/actions/download-artifact@v4
|
||||
with:
|
||||
name: dist
|
||||
- run: npm test
|
||||
- run: npm run test:integration --workspaces --if-present
|
||||
|
||||
e2e:
|
||||
needs: [build, lint, unit]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: https://gitea.com/actions/checkout@v4
|
||||
- uses: https://gitea.com/actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- uses: https://gitea.com/actions/download-artifact@v4
|
||||
with:
|
||||
name: dist
|
||||
- name: Cache Playwright browsers
|
||||
uses: https://github.com/actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/ms-playwright
|
||||
key: playwright-${{ runner.os }}-${{ hashFiles('package.json') }}
|
||||
- run: npx playwright install chromium
|
||||
- run: npm run test:e2e -w imhotep-fixtures
|
||||
- run: npm run test:external-smoke
|
||||
- run: npm run test --workspace=imhotep-bench
|
||||
- run: |
|
||||
for pkg in packages/*/; do
|
||||
name=$(node -p "require('./${pkg}package.json').name")
|
||||
if [ -d "${pkg}dist" ]; then
|
||||
echo "Packing $name..."
|
||||
(cd "$pkg" && npm pack)
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user