Skip to content

Commit

Permalink
fix: deprecated use of docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgenengelsen committed Aug 23, 2024
1 parent a096868 commit b9296e9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
- name: Set up uv
run: |
curl -LsSf https://astral.sh/uv/0.3.2/install.sh | sh
cd api
- name: Restore uv cache
uses: actions/cache@v4
Expand All @@ -42,8 +41,11 @@ jobs:
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
uv-${{ runner.os }}
- name: Install deps
run: cd api && uv sync --frozen

- name: Run tests
run: uv run pre-commit run --all-files
run: uv run --dev pre-commit run --all-files

- name: Minimize uv cache
run: uv cache prune --ci
Expand All @@ -63,10 +65,10 @@ jobs:
- name: BDD Integration tests
if: ${{ false }} # disable for now
run: docker-compose -f docker-compose.yml -f docker-compose.ci.yml run api behave
run: docker compose -f docker-compose.yml -f docker-compose.ci.yml run api uv run behave

- name: Pytest Integration tests
run: docker-compose -f docker-compose.yml -f docker-compose.ci.yml run --rm api pytest --integration
run: docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm api uv run pytest --integration

test-web:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ RUN mkdir -p /.cache/uv && \
chown -R 1000:1000 /.cache/uv/

FROM base as development
RUN uv sync --dev
RUN uv sync --frozen --no-cache
WORKDIR /code/src
COPY src .
USER 1000

FROM base as prod
RUN uv sync
RUN uv sync --frozen --no-cache
WORKDIR /code/src
COPY src .
USER 1000
6 changes: 5 additions & 1 deletion api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ dev-dependencies = [
"mongomock >=4.1.2,<5"
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"


[tool.interrogate]
ignore-init-method = true
Expand Down Expand Up @@ -86,7 +90,7 @@ ignore = [
"src/tests/*" = ["S101"] # Allow the use of ´assert´ in tests

[tool.codespell]
skip = "*.lock,*.cjs"
skip = "*.lock,*.cjs,documentation/docs/changelog/changelog.md"
ignore-words-list = "ignored-word"

[tool.pytest]
Expand Down

0 comments on commit b9296e9

Please sign in to comment.