diff options
Diffstat (limited to '')
| -rw-r--r-- | .github/workflows/lint.yaml | 7 | ||||
| -rw-r--r-- | Dockerfile | 10 | 
2 files changed, 10 insertions, 7 deletions
| diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 3c82a0f2..3b5f2a5e 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -16,6 +16,9 @@ jobs:        PIP_NO_CACHE_DIR: false        PIP_USER: 1 +      # Disable Poetry virtualenv creation +      POETRY_VIRTUALENVS_CREATE: false +        # Specify explicit paths for python dependencies and the pre-commit        # environment so we know which directories to cache        PYTHONUSERBASE: ${{ github.workspace }}/.cache/py-user-base @@ -71,7 +74,7 @@ jobs:        # action. As pre-commit does not support user installs, we set        # PIP_USER=0 to not do a user install.        - name: Run pre-commit hooks -        run: export PIP_USER=0; SKIP=flake8 poetry run pre-commit run --all-files +        run: export PIP_USER=0; SKIP=flake8 pre-commit run --all-files        # Run flake8 and have it format the linting errors in the format of        # the GitHub Workflow command to register error annotations. This @@ -82,7 +85,7 @@ jobs:        # Format used:        # ::error file={filename},line={line},col={col}::{message}        - name: Run flake8 -        run: "poetry run flake8 \ +        run: "flake8 \          --format='::error file=%(path)s,line=%(row)d,col=%(col)d::[flake8] %(code)s: %(text)s'"        # Prepare the Pull Request Payload artifact. If this fails, we @@ -1,11 +1,9 @@  FROM python:3.9-slim -# Set SHA build argument -ARG git_sha="development" -  # Set pip to have cleaner logs and no saved cache  ENV PIP_NO_CACHE_DIR=false \ -    POETRY_HOME="/opt/poetry" +    POETRY_HOME="/opt/poetry" \ +    POETRY_VIRTUALENVS_CREATE=false  # Install git to be able to dowload git dependencies in the Pipfile  RUN apt-get -y update \ @@ -24,11 +22,13 @@ COPY pyproject.toml poetry.lock /bot/  RUN poetry install --no-dev --no-interaction --no-ansi +# Set SHA build argument +ARG git_sha="development"  ENV GIT_SHA=$git_sha  COPY . . -CMD ["poetry", "run", "python", "-m", "bot"] +CMD ["python", "-m", "bot"]  # Define docker persistent volumes  VOLUME /bot/bot/log /bot/data | 
