diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 20ebb32..0000000 --- a/.dockerignore +++ /dev/null @@ -1,7 +0,0 @@ -# Ignore everything -* - -# The stuff necessary to build the image -!app/ -!setup.cfg -!setup.py diff --git a/.woodpecker.yml b/.woodpecker.yml index 64bbb61..dd78ca4 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,21 +1,17 @@ +matrix: + PYTHON_VERSION: + - 3.8 + - 3.9 + pipeline: test: # Alpine version doesn't have make - image: python:3.8 + image: python:${PYTHON_VERSION} pull: true commands: - make test lint: - image: python:3.8 + image: python:${PYTHON_VERSION} commands: - make lint - - publish-dev: - image: plugins/docker - repo: chewingbever/jos - tag: [ dev ] - secrets: [ docker_username, docker_password ] - when: - branch: develop - event: push diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 9b953d5..0000000 --- a/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -FROM python:3.9 AS builder - -WORKDIR /wheels - -# Update pip & build the wheels -COPY ./setup.cfg ./ -RUN pip wheel -e . - - -FROM python:3.9-slim - -# Switch to non-root user -RUN groupadd -r runner && \ - useradd -mrg runner runner - -# Install the generated wheels -COPY --from=builder /wheels /wheels -RUN pip install \ - --no-cache-dir \ - --no-warn-script-location \ - -f /wheels \ - -e /wheels && \ - rm -rf /wheels - -# Switch to non-root user -USER runner - -# Copy source files -WORKDIR /usr/src/app -COPY --chown=runner:runner ./app ./app -COPY --chown=runner:runner setup.cfg setup.py ./ - -ENTRYPOINT ["python"] -CMD ["app"] diff --git a/Makefile b/Makefile index 249362d..cdbab9c 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ PYTHON := python3 # This can't contain spaces (I think) VENV := .venv # Minimum % coverage for tests to succeed -MIN_COV := 0 +MIN_COV := 10 # By default, just create the venv when needed @@ -49,7 +49,6 @@ clean: .PHONY: clean -## Starting the server -### Run the Quart server +# Run the Flask server +# TODO run: venv - @ '$(VENV)'/bin/python app diff --git a/app/__init__.py b/app/__init__.py index 142af97..e69de29 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -1 +0,0 @@ -"""Main application package containing all code.""" diff --git a/app/__main__.py b/app/__main__.py index be8dbd3..e69de29 100644 --- a/app/__main__.py +++ b/app/__main__.py @@ -1,13 +0,0 @@ -"""Main entrypoint for the program.""" -from quart import Quart - -app = Quart("jos") - - -@app.route("/") -async def hello(): - """Placeholder route.""" - return "hello" - - -app.run(host="0.0.0.0") diff --git a/tests/test_succeed.py b/tests/test_succeed.py deleted file mode 100644 index 81db0b6..0000000 --- a/tests/test_succeed.py +++ /dev/null @@ -1,3 +0,0 @@ -def test_succeed(): - """Placeholder test to make CI succeed.""" - pass