From 3c17459b4e1ecd4193bac14fcc4990542e8802b2 Mon Sep 17 00:00:00 2001 From: gnezim Date: Wed, 15 Apr 2026 16:19:18 +0300 Subject: [PATCH] Add CI pipeline with typecheck, lint, test, build, and security audit --- .github/workflows/ci.yml | 57 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..fbebe3dc --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,57 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + ci: + runs-on: ubuntu-latest + timeout-minutes: 20 + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Typecheck + run: pnpm typecheck + + - name: Lint + run: pnpm lint + + - name: Test + run: pnpm test + + - name: Test coverage + run: pnpm test:coverage + + - name: Build both targets + run: pnpm build:both + + - name: Validate MF manifest + run: | + MANIFEST=$(find dist/remote -name "mf-manifest.json" | head -1) + node -e " + const m = JSON.parse(require('fs').readFileSync('$MANIFEST','utf8')); + const paths = m.exposes.map(e => e.path); + const required = ['./OnlineBoard','./Schedule','./FlightsMap','./PopularRequests']; + const missing = required.filter(r => !paths.includes(r)); + if (missing.length) { console.error('MISSING:', missing); process.exit(1); } + console.log('All 4 exposes verified:', paths); + " + + - name: Security audit + run: pnpm audit --audit-level=moderate + continue-on-error: true