fix(docs): correct webmanifest name and guard deploy job against PR runs #623
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI Rust | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "crates/html-to-markdown/**" | |
| - "crates/html-to-markdown-cli/**" | |
| - "e2e/rust/**" | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - "rust-toolchain.toml" | |
| - "rustfmt.toml" | |
| - ".cargo/config.toml" | |
| - "fixtures/**" | |
| - "tools/e2e-generator/**" | |
| - ".github/workflows/ci-rust.yaml" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "crates/html-to-markdown/**" | |
| - "crates/html-to-markdown-cli/**" | |
| - "e2e/rust/**" | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - "rust-toolchain.toml" | |
| - "rustfmt.toml" | |
| - ".cargo/config.toml" | |
| - "fixtures/**" | |
| - "tools/e2e-generator/**" | |
| - ".github/workflows/ci-rust.yaml" | |
| workflow_dispatch: {} | |
| concurrency: | |
| group: ci-rust-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| RUST_BACKTRACE: short | |
| BUILD_PROFILE: "ci" | |
| permissions: | |
| contents: read | |
| jobs: | |
| validate-rust: | |
| name: "Validate: Rust" | |
| runs-on: ubuntu-24.04-arm | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Rust | |
| uses: xberg-io/actions/setup-rust@v1 # v1 | |
| with: | |
| components: rustfmt, clippy, llvm-tools-preview | |
| - name: Install Task | |
| uses: xberg-io/actions/install-task@v1 # v1 | |
| - name: Check Rust Formatting | |
| run: task rust:lint:check | |
| shell: bash | |
| - name: Run Clippy | |
| run: task rust:lint:check | |
| shell: bash | |
| - name: Check feature flags (html-to-markdown) | |
| shell: bash | |
| env: | |
| RUSTFLAGS: "-D warnings" | |
| run: | | |
| cargo check -p html-to-markdown-rs --no-default-features | |
| cargo check -p html-to-markdown-rs --no-default-features --features visitor | |
| cargo check -p html-to-markdown-rs --no-default-features --features metadata | |
| cargo check -p html-to-markdown-rs --no-default-features --features inline-images | |
| rust-tests: | |
| name: "Test: Rust (${{ matrix.os }})" | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| id: checkout | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Setup Rust | |
| uses: xberg-io/actions/setup-rust@v1 # v1 | |
| with: | |
| components: rustfmt, clippy, llvm-tools-preview | |
| cache-key-prefix: rust-tests-${{ matrix.os }} | |
| - name: Install Task | |
| uses: xberg-io/actions/install-task@v1 # v1 | |
| - name: Run Rust Tests | |
| env: | |
| RUST_BACKTRACE: full | |
| run: task rust:test:ci | |
| shell: bash | |
| - name: Run E2E Tests | |
| run: task rust:e2e:test | |
| shell: bash | |
| - name: Cleanup Rust cache | |
| if: always() && steps.checkout.outcome == 'success' | |
| uses: xberg-io/actions/cleanup-rust-cache@v1 # v1 | |
| rust-coverage: | |
| name: "Coverage: Rust" | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Rust | |
| uses: xberg-io/actions/setup-rust@v1 # v1 | |
| with: | |
| components: rustfmt, clippy, llvm-tools-preview | |
| - name: Install Task | |
| uses: xberg-io/actions/install-task@v1 # v1 | |
| - name: Generate Rust Coverage | |
| run: task rust:coverage | |
| shell: bash | |
| - name: Upload Coverage Artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage-report-${{ github.sha }} | |
| path: rust-coverage.lcov | |
| retention-days: 7 |