name: CI on: push: branches: [main] pull_request: workflow_dispatch: concurrency: group: ci-${{ github.ref }} cancel-in-progress: true env: CARGO_TERM_COLOR: always RUST_BACKTRACE: "1" jobs: rust: name: Rust build, lint & test runs-on: ubuntu-latest timeout-minutes: 60 steps: - uses: actions/checkout@v4 - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable with: components: rustfmt, clippy - name: Cache cargo artifacts uses: Swatinem/rust-cache@v2 - name: Format check run: cargo fmt --all -- --check - name: Clippy run: cargo clippy --workspace --all-targets -- -D warnings - name: Build run: cargo build --workspace --all-targets - name: Test run: cargo test --workspace python-sdk: name: Python SDK (py${{ matrix.python-version }}) runs-on: ubuntu-latest timeout-minutes: 20 strategy: fail-fast: false matrix: python-version: ["3.10", "3.12"] defaults: run: working-directory: sdks/python steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install SDK with dev dependencies run: | python -m pip install --upgrade pip pip install -e ".[dev]" || pip install -e . pytest pytest-asyncio pip install ruff - name: Lint (ruff, error-level rules) run: ruff check --select E9,F63,F7,F82 shoal tests - name: Unit tests run: python -m pytest -v tests typescript-sdk: name: TypeScript SDK runs-on: ubuntu-latest timeout-minutes: 20 defaults: run: working-directory: sdks/typescript steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: "20" - name: Install dependencies run: npm install - name: Lint run: npm run lint --if-present - name: Build run: npm run build --if-present - name: Unit tests run: npm test docker-image: name: Docker image build runs-on: ubuntu-latest timeout-minutes: 45 steps: - uses: actions/checkout@v4 - name: Set up Buildx uses: docker/setup-buildx-action@v3 - name: Build image (no push) uses: docker/build-push-action@v6 with: context: . file: deploy/docker/Dockerfile push: false tags: shoal:ci cache-from: type=gha cache-to: type=gha,mode=max helm: name: Helm chart lint runs-on: ubuntu-latest timeout-minutes: 10 steps: - uses: actions/checkout@v4 - name: Lint chart run: helm lint deploy/helm/shoal - name: Render templates with default values run: helm template ci-render deploy/helm/shoal > /dev/null