chore: updated and linted #482
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 Validate | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'crates/kreuzberg/**' | |
| - 'crates/kreuzberg-cli/**' | |
| - 'crates/kreuzberg-py/**' | |
| - 'crates/kreuzberg-node/**' | |
| - 'crates/kreuzberg-ffi/**' | |
| - 'crates/kreuzberg-tesseract/**' | |
| - 'crates/kreuzberg-wasm/**' | |
| - 'packages/python/**' | |
| - 'packages/typescript/**' | |
| - 'packages/ruby/**' | |
| - 'packages/java/**' | |
| - 'packages/go/v4/**' | |
| - 'packages/csharp/**' | |
| - 'packages/wasm/**' | |
| - 'tools/benchmark-harness/**' | |
| - 'tools/e2e-generator/**' | |
| - 'scripts/**' | |
| - '.github/actions/**' | |
| - '.cargo/config.toml' | |
| - '.pre-commit-config.yaml' | |
| - '.golangci.yml' | |
| - 'pyproject.toml' | |
| - 'pnpm-lock.yaml' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - '.github/workflows/ci-validate.yaml' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'crates/kreuzberg/**' | |
| - 'crates/kreuzberg-cli/**' | |
| - 'crates/kreuzberg-py/**' | |
| - 'crates/kreuzberg-node/**' | |
| - 'crates/kreuzberg-ffi/**' | |
| - 'crates/kreuzberg-tesseract/**' | |
| - 'crates/kreuzberg-wasm/**' | |
| - 'packages/python/**' | |
| - 'packages/typescript/**' | |
| - 'packages/ruby/**' | |
| - 'packages/java/**' | |
| - 'packages/go/v4/**' | |
| - 'packages/csharp/**' | |
| - 'packages/wasm/**' | |
| - 'tools/benchmark-harness/**' | |
| - 'tools/e2e-generator/**' | |
| - 'scripts/**' | |
| - '.github/actions/**' | |
| - '.cargo/config.toml' | |
| - '.pre-commit-config.yaml' | |
| - '.golangci.yml' | |
| - 'pyproject.toml' | |
| - 'pnpm-lock.yaml' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - '.github/workflows/ci-validate.yaml' | |
| concurrency: | |
| group: ci-validate-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| CARGO_PROFILE_DEV_DEBUG: 0 | |
| RUST_BACKTRACE: short | |
| RUST_MIN_STACK: 16777216 | |
| PDFIUM_VERSION: "7578" | |
| PDFIUM_STATIC_VERSION: "7442b" | |
| ORT_VERSION: "1.23.2" | |
| MACOSX_DEPLOYMENT_TARGET: "14.0" | |
| BUILD_PROFILE: "ci" | |
| jobs: | |
| validate: | |
| name: Validate (Lint & Format) | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 180 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Show initial disk space | |
| run: scripts/ci/validate/show-disk-space.sh "Initial disk space" | |
| shell: bash | |
| - name: Free disk space before setup | |
| uses: ./.github/actions/free-disk-space-linux | |
| with: | |
| show-initial: "false" | |
| show-final: "true" | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| cache-key-prefix: validate | |
| - name: Setup OpenSSL | |
| uses: ./.github/actions/setup-openssl | |
| - name: Setup Python | |
| uses: ./.github/actions/setup-python-env | |
| with: | |
| python-version: "3.13" | |
| cache-prefix: validate | |
| - name: Setup Node | |
| uses: ./.github/actions/setup-node-workspace | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.4" | |
| bundler-cache: true | |
| working-directory: packages/ruby | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| id: setup-java | |
| with: | |
| distribution: 'temurin' | |
| java-version: '25' | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25' | |
| cache-dependency-path: packages/go/go.sum | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| tools: composer | |
| - name: Install PHP dependencies | |
| run: | | |
| cd packages/php | |
| composer install | |
| shell: bash | |
| - name: Setup Elixir | |
| uses: erlef/setup-elixir@v1 | |
| with: | |
| elixir-version: '1.17' | |
| otp-version: '27.2' | |
| version-type: strict | |
| - name: Install Elixir dependencies | |
| run: | | |
| cd packages/elixir | |
| mix deps.get | |
| shell: bash | |
| - name: Check disk space before tool installations | |
| run: scripts/ci/validate/show-disk-space.sh "Disk space before tool installations" | |
| shell: bash | |
| - name: Install Task | |
| uses: ./.github/actions/install-task | |
| - name: Install golangci-lint | |
| run: | | |
| curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$(go env GOPATH)/bin" v2.7.2 | |
| echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" | |
| shell: bash | |
| - name: Check disk space before lint | |
| run: scripts/ci/validate/show-disk-space.sh "Disk space before lint" | |
| shell: bash | |
| - name: Run prek hooks | |
| uses: j178/[email protected] | |
| with: | |
| extra-args: --all-files | |
| - name: Check final disk space | |
| if: always() | |
| run: scripts/ci/validate/show-disk-space.sh "Final disk space" | |
| shell: bash | |
| - name: Cleanup build artifacts after lint | |
| if: always() | |
| run: scripts/ci/validate/cleanup-after-lint.sh | |
| shell: bash |