Add some scripts to help release (#2522) #113
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
| # Licensed to the Apache Software Foundation (ASF) under one | ||
|
Check failure on line 1 in .github/workflows/ci_hf_cdc.yml
|
||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
| name: HuggingFace and CDC Integration Tests | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| paths: | ||
| - 'crates/storage/opendal/**' | ||
| - 'crates/iceberg/src/io/**' | ||
| - 'crates/iceberg/src/spec/table_properties.rs' | ||
| - 'crates/integrations/datafusion/**' | ||
| - 'bindings/python/tests/test_huggingface_and_cdc.py' | ||
| - '.github/workflows/ci_hf_cdc.yml' | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | ||
| cancel-in-progress: true | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| hf-integration: | ||
| name: HuggingFace Hub integration tests | ||
| runs-on: ubuntu-latest | ||
| # Skip the job entirely when HF secrets are not available (e.g. PRs from forks). | ||
| if: ${{ secrets.HF_TOKEN != '' }} | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Setup Rust toolchain | ||
| uses: ./.github/actions/setup-builder | ||
| - name: Cache Rust artifacts | ||
| uses: swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 | ||
| - name: Install protoc | ||
| uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 | ||
| with: | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Run Rust HF integration tests | ||
| env: | ||
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | ||
| HF_BUCKET: ${{ secrets.HF_BUCKET }} | ||
| HF_DATASET: ${{ secrets.HF_DATASET }} | ||
| run: | | ||
| cargo test -p iceberg-storage-opendal \ | ||
| --features opendal-hf \ | ||
| --test file_io_hf_test \ | ||
| -- --test-threads=1 | ||
| cdc-python: | ||
| name: CDC and HuggingFace Python tests | ||
| runs-on: ubuntu-latest | ||
| # Skip when HF secrets are not available (e.g. PRs from forks). | ||
| if: ${{ secrets.HF_TOKEN != '' }} | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | ||
| with: | ||
| python-version: "3.12" | ||
| - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 | ||
| with: | ||
| working-directory: "bindings/python" | ||
| command: build | ||
| args: --out dist -i python3.12 | ||
| - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | ||
| with: | ||
| version: "0.9.3" | ||
| enable-cache: true | ||
| - name: Install dependencies | ||
| working-directory: "bindings/python" | ||
| run: | | ||
| make install | ||
| uv pip install --no-build --reinstall --find-links dist/ pyiceberg-core | ||
| - name: Run CDC and HuggingFace Python tests | ||
| working-directory: "bindings/python" | ||
| env: | ||
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | ||
| HF_DATASET: ${{ secrets.HF_DATASET }} | ||
| run: | | ||
| uv run --no-sync pytest tests/test_huggingface_and_cdc.py -v | ||