deps: update genai-utils import #13
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: Lint, Test and Build | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| UV_VERSION: 0.7.19 | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # This step is necessary if any dependencies are in private repos | |
| - name: Setup git config | |
| run: | | |
| git config set --global --append url."https://fullfactdeploy:${{ secrets.GH_TOKEN_READONLY }}@github.com/".insteadOf "git@github.com:" | |
| git config set --global --append url."https://fullfactdeploy:${{ secrets.GH_TOKEN_READONLY }}@github.com/".insteadOf "ssh://git@github.com/" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: "pyproject.toml" | |
| - name: Check uv.lock is in sync with pyproject.toml | |
| run: uv lock --locked --offline | |
| - name: Install dependencies | |
| run: uv sync --locked --all-extras --dev | |
| - name: Check typing with mypy | |
| run: uv run mypy --install-types --non-interactive src | |
| - name: Check code formatting with black | |
| run: uv run black --check . | |
| - name: Check import order | |
| run: uv run isort --check-only . | |
| - name: PEP8 | |
| run: uv run flake8 src tests | |
| - name: Run tests | |
| run: uv run pytest | |
| env: | |
| PYTHONPATH: src | |
| build: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Bump version and push tag | |
| id: tag_version | |
| uses: mathieudutour/github-tag-action@v6.2 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| release_branches: main | |
| pre_release_branches: dev | |
| - name: Create a GitHub release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: ${{ steps.tag_version.outputs.new_tag }} | |
| name: Release ${{ steps.tag_version.outputs.new_tag }} | |
| body: ${{ steps.tag_version.outputs.changelog }} |