Skip to content

feat: add support for resources endpoints #38

feat: add support for resources endpoints

feat: add support for resources endpoints #38

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v5
- name: Mark source directory as safe
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Download and verify dependencies
run: make deps verify
- name: Check formatting
run: make fmt/check
- name: Run lint checks
run: make ci/lint
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Check out repository code
uses: actions/checkout@v5
- name: Mark source directory as safe
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Run tests with coverage
run: make ci/test
shell: bash
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v4
with:
file: ./coverage.out
flags: unittests
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage report
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.out
retention-days: 30
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Check out repository code
uses: actions/checkout@v5
- name: Mark source directory as safe
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Build binary
run: make ci/build
shell: bash
- name: Verify binary works
run: ./bin/terramate-mcp-server --help
shell: bash
- name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
name: terramate-mcp-server-${{ matrix.os }}
path: bin/terramate-mcp-server
retention-days: 7
docker:
name: Docker Build Test
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image (test only)
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: false
tags: terramate-mcp-server:test
cache-from: type=gha
cache-to: type=gha,mode=max