Skip to content

feat: app factory

feat: app factory #920

Workflow file for this run

name: CI/CD
on:
push: # A push indicates that a PR is merged and CD should be triggered
branches:
- main
pull_request: # For PRs, we run CI, which is the same as CD without the release step(s)
branches:
- main
jobs:
check_rust:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
env:
# Enable verbose logging for debugging localnet and test issues
RUST_LOG: debug
# Ensure output is not buffered for immediate feedback
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.85.0
components: clippy, rustfmt
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install algokit CLI
run: uv tool install algokit
- name: Check formatting
run: cargo fmt --check
- name: Clippy
# Run clippy and treat warnings as errors
run: cargo clippy -- -D warnings
- name: Check
run: cargo check
- name: Start localnet
run: algokit localnet start
- name: Build all crates
run: cargo build --workspace
- name: Run all Rust tests with verbose output
run: cargo test --workspace --verbose -- --nocapture
# A setup job to define the matricies that will be used across all of the jobs in this workflow
setup:
runs-on: ubuntu-latest
outputs:
# The packages that use Uniffi bindings
ffi_packages: ${{ steps.set_ffi_packages.outputs.ffi_packages }}
steps:
- id: set_ffi_packages
run: echo 'ffi_packages=["algokit_transact"]' >> $GITHUB_OUTPUT
python_uniffi_ci_cd:
needs:
- setup
uses: ./.github/workflows/python_uniffi_ci_cd.yml
strategy:
matrix:
crate: ${{ fromJSON(needs.setup.outputs.ffi_packages) }}
with:
crate: ${{ matrix.crate }}
release: ${{ github.event_name == 'push' }}
secrets:
BOT_ID: ${{ secrets.BOT_ID }}
BOT_SK: ${{ secrets.BOT_SK }}
deploy_docs:
# Only run on pushes to main (not on PRs)
if: github.event_name == 'push'
uses: ./.github/workflows/deploy_docs.yml