From 0cf6103825a4626dc8dca63666915a0cffccd923 Mon Sep 17 00:00:00 2001 From: antoniouaa Date: Wed, 10 Apr 2024 22:22:09 +0100 Subject: [PATCH] fix up docker issues --- .github/workflows/test.yml | 18 ++++++++---------- .github/workflows/types.yml | 36 +++++++++++++++++------------------- Dockerfile | 12 ++++++------ 3 files changed, 31 insertions(+), 35 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e66a3c4..ecb6e46 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,24 +9,22 @@ jobs: - name: Checkout the repo uses: actions/checkout@v2 - - name: Install python 3.7 + - name: Install python 3.11 uses: actions/setup-python@v2 with: - python-version: 3.7 + python-version: 3.11 - - name: Install Poetry Action - uses: snok/install-poetry@v1.1.6 + - name: Setup PDM + - uses: actions/checkout@v4 + uses: pdm-project/setup-pdm@v4 - name: Install dependencies - run: | - poetry install - poetry -V - poetry run pytest -V + run: pdm install - name: Run the tests run: | - poetry run task test - poetry run coveralls --service=github + pdm run task test + pdm run coveralls --service=github env: KRYPTO_TOKEN: ${{ secrets.KRYPTO_TOKEN }} COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} diff --git a/.github/workflows/types.yml b/.github/workflows/types.yml index 4d57757..753269f 100644 --- a/.github/workflows/types.yml +++ b/.github/workflows/types.yml @@ -3,26 +3,24 @@ name: MyPy on: [push] jobs: - type-checking: - runs-on: ubuntu-latest - steps: - - name: Checkout the repo - uses: actions/checkout@v2 + type-checking: + runs-on: ubuntu-latest + steps: + - name: Checkout the repo + uses: actions/checkout@v2 - - name: Install python 3.7 - uses: actions/setup-python@v2 - with: - python-version: 3.7 + - name: Install python 3.7 + uses: actions/setup-python@v2 + with: + python-version: 3.7 - - name: Install Poetry Action - uses: snok/install-poetry@v1.1.6 + - uses: actions/checkout@v4 + - name: Setup PDM + uses: pdm-project/setup-pdm@v4 - - name: Install dependencies - run: | - poetry install - poetry -V - poetry run mypy -V + - name: Install dependencies + run: pdm install - - name: Run the typechecking with mypy - run: | - poetry run task mypy + - name: Run the typechecking with mypy + run: | + pdm run task mypy diff --git a/Dockerfile b/Dockerfile index 4e860f1..7d1f5f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,17 @@ -FROM python:3.7 +FROM python:3.11 -ENV KRYPTO_TOKEN = $KRYPTO_TOKEN -ENV REPOINFO $GITHUB_REPOSITORY +ENV KRYPTO_TOKEN=$KRYPTO_TOKEN +ENV REPOINFO=$GITHUB_REPOSITORY WORKDIR /krypto RUN apt-get -y update && apt-get -y upgrade -RUN pip install poetry +RUN pip install pdm COPY . /krypto -RUN poetry install -RUN poetry build +RUN pdm install +RUN pdm build RUN pip install /krypto LABEL "maintainer"="antoniouaa "