From 3e619a2a840b37728c27ec73771aab4a8836c48e Mon Sep 17 00:00:00 2001 From: sebthom Date: Mon, 31 Jan 2022 19:31:07 +0100 Subject: [PATCH] Rename some tasks --- .github/workflows/build.yml | 16 ++++++++-------- README.md | 7 +++---- docker/image/Dockerfile | 4 ++-- pyproject.toml | 8 ++++---- 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4611fcc..0f42b19 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,17 +61,17 @@ jobs: pdm install -v - - name: Scanning for security issues using bandit + - name: run security scan run: | - pdm run bandit + pdm run scan - - name: pylint + - name: check code style run: | - pdm run pylint + pdm run lint - - name: pytest + - name: run unit tests run: | - pdm run pytest + pdm run test - name: run kleinanzeigen_bot run: | @@ -118,11 +118,11 @@ jobs: ;; esac - - name: pyinstaller + - name: build self-contained executable run: | set -eux - pdm run pyinstaller + pdm run compile ls -l dist diff --git a/README.md b/README.md index 9377e49..d5e3266 100644 --- a/README.md +++ b/README.md @@ -268,10 +268,9 @@ updated_on: # set automatically > Please read [CONTRIBUTING.md](CONTRIBUTING.md) before contributing code. Thank you! -- Running unit tests: `pdm run pytest` -- Running linter: `pdm run pylint` -- Displaying effective version:`python setup.py --version` -- Creating Windows executable: `pdm run pyinstaller` +- Running unit tests: `pdm run test` +- Running linter: `pdm run lint` +- Creating platform-specific executable: `pdm run compile` - Application bootstrap works like this: ```python pdm run app diff --git a/docker/image/Dockerfile b/docker/image/Dockerfile index 1c19468..00ef11c 100644 --- a/docker/image/Dockerfile +++ b/docker/image/Dockerfile @@ -39,8 +39,8 @@ RUN apt-get update \ # install required libraries && apt-get install --no-install-recommends -y \ binutils `# required by pyinstaller` \ + #curl xz-utils `# required to install upx` \ git `# required by pdm to generate app version` \ - curl xz-utils `# required to install upx` \ # # install upx # upx is currently not supported on Linux, see https://github.com/pyinstaller/pyinstaller/discussions/6275 @@ -68,7 +68,7 @@ RUN cd /opt/app \ && pip install -t __pypackages__/3.10/lib selenium \ && pdm install -v \ && ls -la kleinanzeigen_bot \ - && pdm run pyinstaller \ + && pdm run compile \ && ls -l dist RUN /opt/app/dist/kleinanzeigen-bot --help diff --git a/pyproject.toml b/pyproject.toml index 51173e2..cb27c1c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,10 +66,10 @@ dev = [ [tool.pdm.scripts] app = "python -m kleinanzeigen_bot" -bandit = "bandit -c pyproject.toml -r kleinanzeigen_bot" -pyinstaller = "python -O -m PyInstaller pyinstaller.spec --clean" -pylint = "pylint kleinanzeigen_bot" -pytest = "python -m pytest -v" +compile = "python -O -m PyInstaller pyinstaller.spec --clean" +lint = "pylint kleinanzeigen_bot" +scan = "bandit -c pyproject.toml -r kleinanzeigen_bot" +test = "python -m pytest -v" #####################