Skip to content

fix(deps): update rust-minor #185

fix(deps): update rust-minor

fix(deps): update rust-minor #185

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
# Cancel in-progress runs when a new run is triggered on the same branch/PR
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
lint-rust:
name: Lint (Rust)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install mise
uses: jdx/mise-action@v3
- name: Install Rust components
run: rustup component add rustfmt clippy
- name: Cache dependencies
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-lint-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-lint-
- name: Check formatting
run: mise run check:fmt
- name: Lint with Clippy
run: mise run check:lint:rust
lint-shell:
name: Lint (Shell)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install mise
uses: jdx/mise-action@v3
- name: Lint shell scripts
run: mise run check:lint:shell
lint-yaml:
name: Lint (YAML)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install mise
uses: jdx/mise-action@v3
- name: Lint YAML files
run: mise run check:lint:yaml
build:
name: Build
runs-on: ubuntu-latest
needs: [lint-rust]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install mise
uses: jdx/mise-action@v3
- name: Cache dependencies
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-
- name: Build release binary
run: mise run build:release
- name: Upload binary artifact
uses: actions/upload-artifact@v6
with:
name: morphir-binary-${{ runner.os }}
path: .morphir/build/bin/morphir
retention-days: 1
test-unit:
name: Test (Unit)
runs-on: ubuntu-latest
needs: [lint-rust]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install mise
uses: jdx/mise-action@v3
- name: Cache dependencies
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-test-
- name: Run unit tests
run: mise run test:unit
test-integration:
name: Test (Integration)
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install mise
uses: jdx/mise-action@v3
- name: Cache dependencies
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-test-
- name: Download morphir binary
uses: actions/download-artifact@v7
with:
name: morphir-binary-${{ runner.os }}
path: .morphir/build/bin/
- name: Make binary executable
run: chmod +x .morphir/build/bin/morphir
- name: Verify binary works
run: .morphir/build/bin/morphir --version
- name: Run integration tests
run: mise run test:integration
docs:
name: Documentation
runs-on: ubuntu-latest
needs: [lint-rust]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install mise
uses: jdx/mise-action@v3
- name: Cache dependencies
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-docs-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-docs-
- name: Build Rust docs
run: cargo doc --no-deps
- name: Generate CLI docs
run: mise run docs:generate
- name: Check docs are up to date
run: |
if ! git diff --quiet docs/ completions/; then
echo "::error::Generated documentation is out of date. Run 'mise run docs:generate' and commit the changes."
git diff docs/ completions/
exit 1
fi
coverage:
name: Coverage
runs-on: ubuntu-latest
needs: [lint-rust]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install mise
uses: jdx/mise-action@v3
- name: Cache dependencies
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-coverage-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-coverage-
- name: Run coverage check
run: mise run check:coverage --force
- name: Upload coverage report
uses: actions/upload-artifact@v6
with:
name: coverage-report
path: target/llvm-cov/html/
retention-days: 14