Skip to content

Commit

Permalink
fix(ci): Set package-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
steinbrueckri committed Jan 9, 2025
1 parent d133a90 commit 902493b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
19 changes: 10 additions & 9 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,33 +46,34 @@ tasks:
deps:
- task: poetry:install-dependencies
cmds:
- poetry run pymarkdownlnt --disable-rules MD013 scan .
- ~/.local/bin/poetry run pymarkdownlnt --disable-rules MD013 scan .

################################################################################
# Python
################################################################################

py:install-dependencies:
run: once
desc: Install dependencies managed by pip
desc: Installs Poetry package manager if not already installed.
deps:
- task: os:install-dependencies
cmds:
- curl -sSL https://install.python-poetry.org | python3 -
- ~/.local/bin/poetry --version

python:lint:
desc: Lint Python code
deps:
- task: poetry:install-dependencies
cmds:
- poetry run flake8 --ignore=E501,W503 --show-source *.py
- ~/.local/bin/poetry run flake8 --ignore=E501,W503 --show-source *.py

python:format:
desc: Format Python files
deps:
- task: poetry:install-dependencies
cmds:
- poetry run black *.py
- ~/.local/bin/poetry run black *.py

################################################################################
# Poetry
Expand All @@ -84,12 +85,12 @@ tasks:
deps:
- task: py:install-dependencies
cmds:
- poetry install
- ~/.local/bin/poetry install

poetry:update-dependencies:
desc: Update all dependencies managed by Poetry to their newest versions
cmds:
- poetry update
- ~/.local/bin/poetry update

################################################################################
# Ansible / Molecule
Expand All @@ -100,14 +101,14 @@ tasks:
deps:
- task: poetry:install-dependencies
cmds:
- poetry run molecule test
- ~/.local/bin/poetry run molecule test

ansible:galaxy:release:
desc: Create a new release on Ansible Galaxy
deps:
- task: poetry:install-dependencies
cmds:
- poetry run ansible-galaxy role import --api-key $GALAXY_API_KEY $(echo $REPO | cut -d/ -f1) $(echo $REPO | cut -d/ -f2)
- ~/.local/bin/poetry run ansible-galaxy role import --api-key $GALAXY_API_KEY $(echo $REPO | cut -d/ -f1) $(echo $REPO | cut -d/ -f2)
requires:
vars: [GALAXY_API_KEY, REPO]

Expand All @@ -120,4 +121,4 @@ tasks:
deps:
- task: poetry:install-dependencies
cmds:
- poetry run ./get-package-urls.py > vars/package_url.yaml
- ~/.local/bin/poetry run ./get-package-urls.py > vars/package_url.yaml
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.1.0"
description = ""
authors = ["Richard Steinbrueck <[email protected]>"]
readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = "^3.11"
Expand Down

0 comments on commit 902493b

Please sign in to comment.