Skip to content

Bump tempfile from 3.23.0 to 3.24.0 #236

Bump tempfile from 3.23.0 to 3.24.0

Bump tempfile from 3.23.0 to 3.24.0 #236

Workflow file for this run

name: Testing FastAPI
on:
push:
branches:
- main
pull_request:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUSTFLAGS: "-D warnings"
WORKING_DIR: "my-project"
MIN_PYTHON_VERSION: "3.11"
SECRET_KEY: someKey
FIRST_SUPERUSER_EMAIL: [email protected]
FIRST_SUPERUSER_PASSWORD: My_password1
FIRST_SUPERUSER_NAME: "Wade Watts"
POSTGRES_HOST: 127.0.0.1
POSTGRES_PORT: 5432
POSTGRES_USER: postgres
POSTGRES_PASSWORD: test_password
POSTGRES_DB: test_db
VALKEY_HOST: 127.0.0.1
VALKEY_PASSWORD: test_password
STACK_NAME: test-stack
DOMAIN: 127.0.0.1
PRODUCTION_MODE: false
DATABASE_URL: postgresql://postgres:[email protected]:5432/test_db
jobs:
test-uv-fastapi-project:
name: test-fastapi-uv-setup-fastapi
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache dependencies
uses: Swatinem/[email protected]
- name: Install sqlx-cli
run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ env.MIN_PYTHON_VERSION }}
- name: Build package
run: cargo build --release -F fastapi
- name: Run creation
run: ./scripts/ci_run_fastapi.sh "fastapi" 1
shell: bash
- name: Pre-commit check
working-directory: ${{ env.WORKING_DIR }}
run: |
git add .
uv run pre-commit run --all-files
- name: make .env
working-directory: ${{ env.WORKING_DIR }}
run: touch .env
- name: Build and start Docker containers
working-directory: ${{ env.WORKING_DIR }}
run: docker compose up -d
- name: Test with pytest
working-directory: ${{ env.WORKING_DIR }}
run: uv run pytest -n auto
test-uv-non-fastapi-project:
name: test-fastapi-uv-setup-non-fastapi
strategy:
fail-fast: false
matrix:
project_type: ["application", "lib"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache dependencies
uses: Swatinem/[email protected]
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ env.MIN_PYTHON_VERSION }}
- name: Build package
run: cargo build --release -F fastapi
- name: Run creation
run: ./scripts/ci_run_fastapi.sh ${{ matrix.project_type }} 1
shell: bash
- name: Pre-commit check
working-directory: ${{ env.WORKING_DIR }}
run: |
git add .
uv run pre-commit run --all-files
- name: Test with pytest
working-directory: ${{ env.WORKING_DIR }}
if: matrix.project_type == 'application'
run: uv run pytest
test-poetry-fastapi-project:
name: test-fastapi-poetry-setup-fastapi
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache dependencies
uses: Swatinem/[email protected]
- name: Install sqlx-cli
run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres
- name: Install Poetry
run: pipx install poetry
- name: Configure poetry
run: |
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ env.MIN_PYTHON_VERSION }}
- name: Build package
run: cargo build --release -F fastapi
- name: Run creation
run: ./scripts/ci_run_fastapi.sh "fastapi" 2
shell: bash
- name: Pre-commit check
working-directory: ${{ env.WORKING_DIR }}
run: |
git add .
poetry run pre-commit run --all-files
- name: make .env
working-directory: ${{ env.WORKING_DIR }}
run: touch .env
- name: Build and start Docker containers
working-directory: ${{ env.WORKING_DIR }}
run: docker compose up -d
- name: Test with pytest
working-directory: ${{ env.WORKING_DIR }}
run: poetry run pytest -n auto
test-poetry-non-fastapi-project:
name: test-fastapi-poetry-setup-non-fastapi
strategy:
fail-fast: false
matrix:
project_type: ["application", "lib"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache dependencies
uses: Swatinem/[email protected]
- name: Install Poetry
run: pipx install poetry
- name: Configure poetry
run: |
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ env.MIN_PYTHON_VERSION }}
- name: Build package
run: cargo build --release -F fastapi
- name: Run creation
run: ./scripts/ci_run_fastapi.sh ${{ matrix.project_type }} 2
shell: bash
- name: Pre-commit check
working-directory: ${{ env.WORKING_DIR }}
run: |
git add .
poetry run pre-commit run --all-files
- name: Test with pytest
working-directory: ${{ env.WORKING_DIR }}
if: matrix.project_type == 'application'
run: poetry run pytest
test-setuptools-fastapi-project:
name: test-fastapi-setuptools-setup-fastapi
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/[email protected]
- name: Install sqlx-cli
run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "${{ env.MIN_PYTHON_VERSION }}"
- name: Build package
run: cargo build --release -F fastapi
- name: Run creation
run: ./scripts/ci_run_fastapi.sh "fastapi" 4
shell: bash
- name: Pre-commit check
working-directory: ${{ env.WORKING_DIR }}
run: |
git add .
.venv/bin/pre-commit run --all-files
- name: make .env
working-directory: ${{ env.WORKING_DIR }}
run: touch .env
- name: Build and start Docker containers
working-directory: ${{ env.WORKING_DIR }}
run: docker compose up -d
- name: Test with pytest
working-directory: ${{ env.WORKING_DIR }}
run: .venv/bin/pytest -n auto
test-setuptools-non-fastapi-project:
name: test-fastapi-setuptools-setup-non-fastapi
strategy:
fail-fast: false
matrix:
project_type: ["application", "lib"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/[email protected]
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "${{ env.MIN_PYTHON_VERSION }}"
- name: Build package
run: cargo build --release -F fastapi
- name: Run creation
run: ./scripts/ci_run_fastapi.sh ${{ matrix.project_type }} 4
shell: bash
- name: Pre-commit check
working-directory: ${{ env.WORKING_DIR }}
run: |
git add .
.venv/bin/pre-commit run --all-files
- name: Test with pytest
working-directory: ${{ env.WORKING_DIR }}
if: matrix.project_type == 'application'
run: .venv/bin/pytest
test-pyo3-uv-fastapi-project:
name: test-fastapi-pyo3-uv-setup-fastapi
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/[email protected]
- name: Install sqlx-cli
run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "${{ env.MIN_PYTHON_VERSION }}"
- name: Build package
run: cargo build --release -F fastapi
- name: Run creation
run: ./scripts/ci_run_fastapi.sh "fastapi" 3
shell: bash
- name: Pre-commit check
working-directory: ${{ env.WORKING_DIR }}
run: |
git add .
uv run pre-commit run --all-files
- name: make .env
working-directory: ${{ env.WORKING_DIR }}
run: touch .env
- name: Build and start Docker containers
working-directory: ${{ env.WORKING_DIR }}
run: docker compose up -d
- name: Test with pytest
working-directory: ${{ env.WORKING_DIR }}
run: uv run pytest -n auto
test-pyo3-uv-non-fastapi-project:
name: test-fastapi-uv-pyo3-setup-non-fastapi
strategy:
fail-fast: false
matrix:
project_type: ["application", "lib"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/[email protected]
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "${{ env.MIN_PYTHON_VERSION }}"
- name: Build package
run: cargo build --release -F fastapi
- name: Run creation
run: ./scripts/ci_run_fastapi.sh ${{ matrix.project_type }} 3
shell: bash
- name: Compile Rust
working-directory: ${{ env.WORKING_DIR }}
run: |
uv run maturin develop
- name: Pre-commit check
working-directory: ${{ env.WORKING_DIR }}
run: |
git add .
uv run pre-commit run --all-files
- name: Test with pytest
working-directory: ${{ env.WORKING_DIR }}
if: matrix.project_type == 'application'
run: uv run pytest
test-pyo3-setuptools-fastapi-project:
name: test-fastapi-pyo3-setuptools-setup-fastapi
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/[email protected]
- name: Install sqlx-cli
run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "${{ env.MIN_PYTHON_VERSION }}"
- name: Build package
run: cargo build --release -F fastapi
- name: Run creation
run: ./scripts/ci_run_fastapi.sh "fastapi" 3 2
shell: bash
- name: Compile Rust
working-directory: ${{ env.WORKING_DIR }}
run: |
.venv/bin/maturin develop
- name: Pre-commit check
working-directory: ${{ env.WORKING_DIR }}
run: |
git add .
.venv/bin/pre-commit run --all-files
- name: make .env
working-directory: ${{ env.WORKING_DIR }}
run: touch .env
- name: Build and start Docker containers
working-directory: ${{ env.WORKING_DIR }}
run: docker compose up -d
- name: Test with pytest
working-directory: ${{ env.WORKING_DIR }}
run: .venv/bin/pytest -n auto
test-pyo3-setuptools-non-fastapi-project:
name: test-fastapi-setuptools-pyo3-setup-non-fastapi
strategy:
fail-fast: false
matrix:
project_type: ["application", "lib"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/[email protected]
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "${{ env.MIN_PYTHON_VERSION }}"
- name: Build package
run: cargo build --release -F fastapi
- name: Run creation
run: ./scripts/ci_run_fastapi.sh ${{ matrix.project_type }} 3 2
shell: bash
- name: Compile Rust
working-directory: ${{ env.WORKING_DIR }}
run: |
.venv/bin/maturin develop
- name: Pre-commit check
working-directory: ${{ env.WORKING_DIR }}
run: |
git add .
.venv/bin/pre-commit run --all-files
- name: Test with pytest
working-directory: ${{ env.WORKING_DIR }}
if: matrix.project_type == 'application'
run: .venv/bin/pytest