Skip to content

feat: ast-grep step type for workflows #39

feat: ast-grep step type for workflows

feat: ast-grep step type for workflows #39

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
env:
TEST_PACKAGES: -p codemod -p codemod-sandbox -p butterflow-core -p butterflow-models -p butterflow-runners -p butterflow-scheduler -p butterflow-state
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@stable
id: toolchain
with:
components: clippy
- run: cargo clippy --tests --no-deps ${{ env.TEST_PACKAGES }} -- -D warnings
format:
name: Format
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@stable
id: toolchain
with:
components: rustfmt
- run: cargo fmt --check
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@stable
id: toolchain
- name: Run tests
run: cargo test ${{ env.TEST_PACKAGES }}
- name: Check schema generation
run: |
# Generate schema
cargo xtask schema
# Check for uncommitted changes (excluding schemas/workflow.ts)
if [[ -n "$(git status --porcelain)" ]]; then
echo '❌ Uncommitted changes detected after running `cargo xtask schema`:'
git --no-pager diff -- .
exit 1
else
echo "✅ No changes — schema is up to date."
fi