Merge pull request #30 from bgaillard/dependabot/uv/python/fast-api-s… #134
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: python-fast-api-simple | |
| on: | |
| push: | |
| paths: | |
| - 'python/fast-api-simple/**' | |
| pull_request: | |
| paths: | |
| - 'python/fast-api-simple/**' | |
| jobs: | |
| test-cookiecutter-rendering: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| # @see https://github.com/actions/setup-python/issues/967#issuecomment-2430610509 | |
| - name: Set up Python 3.14 | |
| uses: actions/setup-python@v6 | |
| id: python | |
| with: | |
| python-version: 3.14 | |
| - name: Install dependencies | |
| run: | | |
| pipx install cookiecutter | |
| pip install -U pytest | |
| pip install -U cookiecutter | |
| env: | |
| PIPX_DEFAULT_PYTHON: ${{ steps.python.outputs.python-path }} | |
| - name: Run tests | |
| run: | | |
| cd python/fast-api-simple | |
| make test | |
| - name: Upload pytest test results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pytest-results-python-fast-api-simple | |
| path: python/fast-api-simple/junit/test-results.xml | |
| # Use always() to always run this step to publish test results when there are test failures | |
| if: ${{ always() }} | |
| test-with-poetry: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: "python/fast-api-simple/{{cookiecutter.project_slug}}" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| # @see https://github.com/actions/setup-python/issues/967#issuecomment-2430610509 | |
| - name: Set up Python 3.14 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.14 | |
| - name: Install poetry | |
| run: | | |
| pipx install poetry | |
| - name: Create .venv | |
| run: DOCKERFILE=Dockerfile.poetry make -f Makefile.poetry install | |
| - name: Lint | |
| run: DOCKERFILE=Dockerfile.poetry make -f Makefile.poetry lint | |
| - name: Test | |
| run: DOCKERFILE=Dockerfile.poetry make -f Makefile.poetry test | |
| - name: Build docker | |
| run: DOCKERFILE=Dockerfile.poetry make -f Makefile.poetry build-docker | |
| test-with-poetry-in-docker: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: "python/fast-api-simple/{{cookiecutter.project_slug}}" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| # @see https://github.com/actions/setup-python/issues/967#issuecomment-2430610509 | |
| - name: Set up Python 3.14 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.14 | |
| - name: Build docker dev | |
| run: DOCKERFILE=Dockerfile.docker.poetry make -f Makefile.docker.poetry build-docker-dev | |
| - name: Create .venv | |
| run: DOCKERFILE=Dockerfile.docker.poetry make -f Makefile.docker.poetry install | |
| - name: Lint | |
| run: DOCKERFILE=Dockerfile.docker.poetry make -f Makefile.docker.poetry lint | |
| - name: Test | |
| run: DOCKERFILE=Dockerfile.docker.poetry make -f Makefile.docker.poetry test | |
| - name: Build docker | |
| run: DOCKERFILE=Dockerfile.docker.poetry make -f Makefile.docker.poetry build-docker | |
| test-with-uv: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: "python/fast-api-simple/{{cookiecutter.project_slug}}" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| # @see https://github.com/actions/setup-python/issues/967#issuecomment-2430610509 | |
| - name: Set up Python 3.14 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.14 | |
| - name: Install uv | |
| run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
| - name: Create .venv | |
| run: DOCKERFILE=Dockerfile.uv make -f Makefile.uv sync | |
| - name: Lint | |
| run: DOCKERFILE=Dockerfile.uv make -f Makefile.uv lint | |
| - name: Test | |
| run: DOCKERFILE=Dockerfile.uv make -f Makefile.uv test | |
| - name: Build docker | |
| run: DOCKERFILE=Dockerfile.uv make -f Makefile.uv build-docker | |
| test-with-uv-in-docker: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: "python/fast-api-simple/{{cookiecutter.project_slug}}" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| # @see https://github.com/actions/setup-python/issues/967#issuecomment-2430610509 | |
| - name: Set up Python 3.14 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.14 | |
| - name: Build docker dev | |
| run: DOCKERFILE=Dockerfile.docker.uv make -f Makefile.docker.uv build-docker-dev | |
| - name: Create .venv | |
| run: DOCKERFILE=Dockerfile.docker.uv make -f Makefile.docker.uv sync | |
| - name: Lint | |
| run: DOCKERFILE=Dockerfile.docker.uv make -f Makefile.docker.uv lint | |
| - name: Test | |
| run: DOCKERFILE=Dockerfile.docker.uv make -f Makefile.docker.uv test | |
| - name: Build docker | |
| run: DOCKERFILE=Dockerfile.docker.uv make -f Makefile.docker.uv build-docker |