name: CI on: push: branches: [master] pull_request: branches: [master] 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 install - 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 install - 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 install - uses: https://gitea.com/actions/download-artifact@v4 with: name: dist - run: npm test - run: npm run test:integration -w imhotep-playwright 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 install - uses: https://gitea.com/actions/download-artifact@v4 with: name: dist - name: Cache Playwright browsers uses: https://gitea.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 -w 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