Remove connect compiler #199
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| quality: | |
| name: Code Quality | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: 'go.mod' | |
| cache: true | |
| - name: Check formatting | |
| run: | | |
| if [ -n "$(gofmt -l .)" ]; then | |
| echo "The following files are not formatted:" | |
| gofmt -l . | |
| echo "Please run 'go fmt ./...' to fix formatting" | |
| exit 1 | |
| fi | |
| - name: Run golangci-lint | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: latest | |
| args: --timeout=10m | |
| skip-cache: true | |
| - name: Run go vet | |
| run: go vet ./... | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: 'go.mod' | |
| cache: true | |
| - name: Install Ginkgo | |
| run: go install github.com/onsi/ginkgo/v2/ginkgo | |
| - name: Run tests | |
| run: | | |
| # Run tests with ginkgo but without the --cover flag to avoid coverage file issues | |
| # Exclude stress_tests directory from regular test runs | |
| ginkgo -r --compilers=4 --race --trace --skip-package=stress_tests | |
| - name: Generate coverage report | |
| run: | | |
| # Generate coverage using go test instead of ginkgo | |
| # Exclude stress_tests directory from coverage | |
| go test -coverprofile=coverage.out -covermode=atomic $(go list ./... | grep -v /stress_tests) | |
| go tool cover -func=coverage.out | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: 'go.mod' | |
| cache: true | |
| - name: Build | |
| run: | | |
| go mod tidy | |
| go build -o ./target/connect-runtime-wombat *.go | |
| - name: Test binary exists | |
| run: | | |
| if [ ! -f ./target/connect-runtime-wombat ]; then | |
| echo "Build failed: binary not found" | |
| exit 1 | |
| fi | |
| validate-components: | |
| name: Validate Component Specs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: '20' | |
| - name: Validate component specs | |
| run: | | |
| curl --silent https://raw.githubusercontent.com/synadia-io/connect/refs/heads/main/model/schemas/component-spec-v1.schema.json -O | |
| npx --yes ajv-cli validate -s component-spec-v1.schema.json -d ".connect/*/*.yml" --verbose |