|
1 | | -name: Test |
| 1 | +name: CI |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | pull_request: |
|
15 | 15 | branches: [master] |
16 | 16 | workflow_dispatch: |
17 | 17 |
|
| 18 | +permissions: |
| 19 | + contents: read |
| 20 | + |
18 | 21 | concurrency: |
19 | 22 | group: ${{ github.workflow }}-${{ github.ref }} |
20 | 23 | cancel-in-progress: true |
21 | 24 |
|
22 | 25 | jobs: |
23 | | - test: |
| 26 | + verify: |
| 27 | + name: Build, test, and audit |
24 | 28 | runs-on: ubuntu-latest |
25 | | - steps: |
26 | | - - uses: actions/checkout@v7 |
| 29 | + timeout-minutes: 15 |
27 | 30 |
|
28 | | - - name: Setup Node |
29 | | - uses: actions/setup-node@v6 |
30 | | - with: |
31 | | - node-version: "20" |
| 31 | + steps: |
| 32 | + - name: Check out repository |
| 33 | + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 |
32 | 34 |
|
33 | | - - name: Setup pnpm |
34 | | - uses: pnpm/action-setup@v4 |
| 35 | + - name: Set up pnpm |
| 36 | + uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 |
35 | 37 | with: |
36 | 38 | version: 10 |
37 | 39 |
|
38 | | - - name: Get pnpm store directory |
39 | | - id: pnpm-cache |
40 | | - shell: bash |
41 | | - run: | |
42 | | - echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT |
43 | | -
|
44 | | - - name: Cache pnpm dependencies |
45 | | - uses: actions/cache@v6 |
| 40 | + - name: Set up Node.js |
| 41 | + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 |
46 | 42 | with: |
47 | | - path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} |
48 | | - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} |
49 | | - restore-keys: | |
50 | | - ${{ runner.os }}-pnpm-store- |
| 43 | + node-version: "26" |
| 44 | + cache: pnpm |
51 | 45 |
|
52 | | - - name: Install Dependencies |
| 46 | + - name: Install dependencies |
53 | 47 | run: pnpm install --frozen-lockfile |
54 | 48 |
|
55 | 49 | - name: Lint |
56 | | - run: pnpm lint:check |
| 50 | + run: pnpm --filter @upstash/context7-mcp lint:check |
57 | 51 |
|
58 | 52 | - name: Format |
59 | | - run: pnpm format:check |
| 53 | + run: pnpm --filter @upstash/context7-mcp format:check |
60 | 54 |
|
61 | 55 | - name: Build |
62 | | - run: pnpm build |
| 56 | + run: pnpm --filter @upstash/context7-mcp build |
63 | 57 |
|
64 | 58 | - name: Typecheck |
65 | | - run: pnpm typecheck |
| 59 | + run: pnpm --filter @upstash/context7-mcp typecheck |
| 60 | + |
| 61 | + - name: Test local MCP |
| 62 | + run: pnpm --filter @upstash/context7-mcp test |
66 | 63 |
|
67 | | - - name: Test |
68 | | - run: pnpm test |
69 | | - env: |
70 | | - AWS_REGION: ${{ secrets.AWS_REGION }} |
71 | | - AWS_BEARER_TOKEN_BEDROCK: ${{ secrets.AWS_BEARER_TOKEN_BEDROCK }} |
72 | | - CONTEXT7_API_KEY: ${{ secrets.CONTEXT7_API_KEY }} |
| 64 | + - name: Audit production dependencies |
| 65 | + run: pnpm audit --prod --audit-level low |
0 commit comments