👷(ci) add dev and notebook ci workflows #6
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: Dev | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| types: [ opened, synchronize, reopened, edited ] | |
| paths: | |
| - "dev/**" | |
| - "src/**" | |
| jobs: | |
| build-dev: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./dev | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "0.8.17" | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: "./dev/.python-version" | |
| - name: Install dev tools | |
| run: uv sync --locked --all-extras --dev | |
| build-docker-dev: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Build dev Docker image | |
| run: bin/compose build dev | |
| commit-format: | |
| needs: build-dev | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./dev | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.head_ref }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "0.8.17" | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: "./dev/.python-version" | |
| - name: Check commit format with commitizen | |
| env: | |
| REV_RANGE: ${{ github.event.pull_request.base.sha || github.event.before }}..${{ github.sha }} | |
| run: uv run cz check --rev-range $REV_RANGE | |
| lint-format: | |
| needs: build-dev | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./dev | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "0.8.17" | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: "./dev/.python-version" | |
| - name: Run pre-commit | |
| run: uv run --project dev pre-commit run --all-files |