Merge pull request #44 from MedTrack-Project/ci/update-dependabot #35
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: Quality | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: quality-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Test, lint and types | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Set up uv and Python | |
| uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 | |
| with: | |
| version: "0.11.30" | |
| python-version: "3.11" | |
| enable-cache: true | |
| - name: Verify locked dependencies | |
| run: uv lock --check | |
| - name: Install development environment | |
| run: uv sync --locked --group dev | |
| - name: Lint | |
| run: uv run --no-sync ruff check src tests scripts | |
| - name: Type check | |
| run: uv run --no-sync pyright src/medtrack_ai tests scripts | |
| - name: Test | |
| run: uv run --no-sync pytest | |
| container: | |
| name: Build container | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Set up Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Build image without publishing | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| push: false | |
| tags: medtrack-ai:ci | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |