Rename some tasks

This commit is contained in:
sebthom
2022-01-31 19:31:07 +01:00
parent acecab57cc
commit 3e619a2a84
4 changed files with 17 additions and 18 deletions

View File

@@ -61,17 +61,17 @@ jobs:
pdm install -v pdm install -v
- name: Scanning for security issues using bandit - name: run security scan
run: | run: |
pdm run bandit pdm run scan
- name: pylint - name: check code style
run: | run: |
pdm run pylint pdm run lint
- name: pytest - name: run unit tests
run: | run: |
pdm run pytest pdm run test
- name: run kleinanzeigen_bot - name: run kleinanzeigen_bot
run: | run: |
@@ -118,11 +118,11 @@ jobs:
;; ;;
esac esac
- name: pyinstaller - name: build self-contained executable
run: | run: |
set -eux set -eux
pdm run pyinstaller pdm run compile
ls -l dist ls -l dist

View File

@@ -268,10 +268,9 @@ updated_on: # set automatically
> Please read [CONTRIBUTING.md](CONTRIBUTING.md) before contributing code. Thank you! > Please read [CONTRIBUTING.md](CONTRIBUTING.md) before contributing code. Thank you!
- Running unit tests: `pdm run pytest` - Running unit tests: `pdm run test`
- Running linter: `pdm run pylint` - Running linter: `pdm run lint`
- Displaying effective version:`python setup.py --version` - Creating platform-specific executable: `pdm run compile`
- Creating Windows executable: `pdm run pyinstaller`
- Application bootstrap works like this: - Application bootstrap works like this:
```python ```python
pdm run app pdm run app

View File

@@ -39,8 +39,8 @@ RUN apt-get update \
# install required libraries # install required libraries
&& apt-get install --no-install-recommends -y \ && apt-get install --no-install-recommends -y \
binutils `# required by pyinstaller` \ binutils `# required by pyinstaller` \
#curl xz-utils `# required to install upx` \
git `# required by pdm to generate app version` \ git `# required by pdm to generate app version` \
curl xz-utils `# required to install upx` \
# #
# install upx # install upx
# upx is currently not supported on Linux, see https://github.com/pyinstaller/pyinstaller/discussions/6275 # 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 \ && pip install -t __pypackages__/3.10/lib selenium \
&& pdm install -v \ && pdm install -v \
&& ls -la kleinanzeigen_bot \ && ls -la kleinanzeigen_bot \
&& pdm run pyinstaller \ && pdm run compile \
&& ls -l dist && ls -l dist
RUN /opt/app/dist/kleinanzeigen-bot --help RUN /opt/app/dist/kleinanzeigen-bot --help

View File

@@ -66,10 +66,10 @@ dev = [
[tool.pdm.scripts] [tool.pdm.scripts]
app = "python -m kleinanzeigen_bot" app = "python -m kleinanzeigen_bot"
bandit = "bandit -c pyproject.toml -r kleinanzeigen_bot" compile = "python -O -m PyInstaller pyinstaller.spec --clean"
pyinstaller = "python -O -m PyInstaller pyinstaller.spec --clean" lint = "pylint kleinanzeigen_bot"
pylint = "pylint kleinanzeigen_bot" scan = "bandit -c pyproject.toml -r kleinanzeigen_bot"
pytest = "python -m pytest -v" test = "python -m pytest -v"
##################### #####################