Files
apex-mcp-server/.github/workflows/ci.yml
FilipBl4gojevic 01416af3ab ci: harden workflow permissions, add timeout and concurrency gate
- permissions: contents: read — this workflow only builds and tests,
  it never writes to the repo; matches the convention deploy.yml
  already sets.
- timeout-minutes: 15 on the job so a hung step doesn't burn runner
  time indefinitely.
- concurrency group keyed on the ref so a new push cancels the
  in-flight run for the same branch/PR instead of queuing behind it.

Action versions are left unpinned (still @v4) — SHA-pinning only this
workflow while deploy.yml stays on @v4 would be an inconsistency to
clean up in its own pass, not here.
2026-07-28 09:57:03 +02:00

45 lines
832 B
YAML

name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
env:
NODE_OPTIONS: --max-old-space-size=12288
- name: Unit tests
run: npm run test:unit
env:
NODE_OPTIONS: --max-old-space-size=12288
- name: Tool inventory smoke test
run: npm run test:smoke
env:
NODE_OPTIONS: --max-old-space-size=12288