Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 23 additions & 20 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,36 @@ name: Python application

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

permissions:
contents: read

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
pip install uv
uv sync
- name: Lint with ruff
run: uv run ruff check
- name: Check formatting with ruff
run: uv run ruff format --check
- name: Typecheck with mypy
run: uv run mypy --strict src
- name: Test with pytest
run: uv run pytest tests
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
pip install uv
uv sync
- name: Lint with ruff
run: uv run ruff check
- name: Check formatting with ruff
run: uv run ruff format --check
- name: Typecheck with mypy
run: uv run mypy --strict src
- name: Test with pytest
run: uv run pytest tests
2 changes: 1 addition & 1 deletion src/deploy/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ async def _engine(
extra_args: list[str] = []
if which == "podman":
extra_args.extend(["--security-opt", "label=disable"])
extra_args.append(f"--userns=keep-id:uid={os.getuid()},gid={os.getgid()}")

volume_args: list[str] = []
for src, dst, kind in volumes:
Expand All @@ -97,7 +98,6 @@ async def _engine(
"-i",
*(f"-e{key}={val}" for key, val in env.items()),
*volume_args,
f"--userns=keep-id:uid={os.getuid()},gid={os.getgid()}",
f"--workdir={cwd}",
*extra_args,
image_id,
Expand Down
Loading