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 41c052c
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 76 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ jobs:
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version-file: "api/pyproject.toml"

- 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,6 +41,9 @@ jobs:
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
uv-${{ runner.os }}
- name: Install deps
run: cd api && uv sync --dev --all-extras

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

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
10 changes: 9 additions & 1 deletion api/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["src/"]

[project]
name = "api"
version = "1.4.0" # x-release-please-version
Expand Down Expand Up @@ -26,6 +33,7 @@ dev-dependencies = [
]



[tool.interrogate]
ignore-init-method = true
ignore-init-module = true
Expand Down Expand Up @@ -86,7 +94,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
Loading

0 comments on commit 41c052c

Please sign in to comment.