Replace HF Datasets with Pooch #1254
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| types: [labeled, opened, synchronize, reopened] | |
| workflow_dispatch: | |
| merge_group: | |
| types: [checks_requested] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| id-token: write # Required for requesting the JWT | |
| contents: read # to fetch code (actions/checkout) | |
| jobs: | |
| get_dataset: | |
| name: Get / Update Example Dataset | |
| env: | |
| cache-name: dataset-cache | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11"] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout ${{github.repository }} | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Restore Example Dataset Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./data/cache/ | |
| key: ${{ env.cache-name }} | |
| enableCrossOsArchive: true | |
| - name: Install uv and setup Python | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| version: "latest" | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install Dependencies and ${{ github.repository }} | |
| run: | | |
| uv sync --frozen | |
| - name: Check the Example Dataset Cache | |
| run: | | |
| uv run ./.github/scripts/get_example_dataset.py | |
| test: | |
| needs: [get_dataset] | |
| name: Test | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| id-token: write | |
| secrets: inherit | |
| uses: ./.github/workflows/test.yml | |
| build: | |
| name: Build | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| id-token: write | |
| secrets: inherit | |
| uses: ./.github/workflows/build.yml | |
| upload_coverage: | |
| needs: [test] | |
| name: Upload Coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout ${{github.repository }} | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download Coverage Artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: coverage-* | |
| merge-multiple: true | |
| - name: Upload Coverage to Coveralls | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} |