From 1fa87fe2ae16875a1ecdfd0b17df7c7d03cdfa5b Mon Sep 17 00:00:00 2001 From: ZGaetano Date: Sun, 3 May 2026 23:50:45 -0400 Subject: [PATCH] Add CI/CD configuration and additional utility scripts: build.yml --- .github/workflows/build.yml | 54 +++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e20ca05 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,54 @@ +name: Build and Test + +on: + push: + branches: [ main, develop ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x] + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build TypeScript + run: npm run build + + - name: Run linter + run: npm run lint --if-present + + - name: Run tests + run: npm test --if-present + + docker: + runs-on: ubuntu-latest + needs: build + + steps: + - uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build Docker image + run: | + docker build -t ross-ultrix-mcp:latest . + + - name: Test Docker image + run: | + docker run --rm ross-ultrix-mcp:latest node dist/health-check.js --simple