Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/actions/check-coverage/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ inputs:
threshold:
description: 'Minimum coverage percentage required'
required: false
default: '75'
default: '85'

runs:
using: 'composite'
steps:
- name: Check coverage threshold
shell: bash
run: |
# Generate coverage report and extract percentage
COVERAGE=$(cargo llvm-cov report --ignore-filename-regex '(test_helpers|api_client|deps)\.rs|sdk/rust-macros' | tail -1 | awk '{print $4}' | sed 's/%//')
# Generate coverage report and extract percentage (excluding spin components)
COVERAGE=$(cargo llvm-cov report --ignore-filename-regex '(test_helpers|api_client|deps)\.rs|sdk/rust-macros|components/mcp-' | tail -1 | awk '{print $4}' | sed 's/%//')
echo "Coverage: ${COVERAGE}%"

# Fail if coverage drops below threshold
Expand Down
34 changes: 12 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,24 +125,21 @@ jobs:
name: Lint Go SDK
if: inputs.go-sdk-changed == 'true' || inputs.ci-changed == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.23', '1.24']
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
go-version: '1.23'

- name: Cache Go modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('sdk/go/go.sum') }}
key: ${{ runner.os }}-go-1.23-${{ hashFiles('sdk/go/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-
${{ runner.os }}-go-1.23-

- name: Install golangci-lint
working-directory: sdk/go
Expand All @@ -168,24 +165,21 @@ jobs:
name: Test Go SDK
if: inputs.go-sdk-changed == 'true' || inputs.ci-changed == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.23', '1.24']
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
go-version: '1.23'

- name: Cache Go modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('sdk/go/go.sum') }}
key: ${{ runner.os }}-go-1.23-${{ hashFiles('sdk/go/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-
${{ runner.os }}-go-1.23-

- name: Install dependencies
working-directory: sdk/go
Expand Down Expand Up @@ -213,27 +207,24 @@ jobs:
name: Test Python SDK
if: inputs.python-sdk-changed == 'true' || inputs.ci-changed == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
defaults:
run:
working-directory: sdk/python
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: '3.10'

- name: Cache pip packages
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('sdk/python/pyproject.toml') }}
key: ${{ runner.os }}-pip-3.10-${{ hashFiles('sdk/python/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-3.10-
${{ runner.os }}-pip-

- name: Install tox
Expand All @@ -245,7 +236,6 @@ jobs:
run: tox

- name: Upload coverage to Codecov
if: matrix.python-version == '3.11'
uses: codecov/codecov-action@v4
with:
file: ./sdk/python/coverage.xml
Expand Down Expand Up @@ -441,8 +431,8 @@ jobs:

- name: Run core crate tests with coverage
run: |
# Run only core crate tests (excluding ftl-cli and ftl-sdk-macros)
cargo llvm-cov nextest --workspace --exclude ftl-cli --exclude ftl-sdk-macros --all-features --profile ci --ignore-filename-regex '(test_helpers|api_client|deps)\.rs|sdk/rust-macros'
# Run only core crate tests (excluding ftl-cli, ftl-sdk-macros, and spin components)
cargo llvm-cov nextest --workspace --exclude ftl-cli --exclude ftl-sdk-macros --all-features --profile ci --ignore-filename-regex '(test_helpers|api_client|deps)\.rs|sdk/rust-macros|components/mcp-'

- name: Check coverage threshold
uses: ./.github/actions/check-coverage
Expand Down
Loading
Loading