Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ jobs:
shell: bash
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade \
-r requirements.txt \
-r requirements-dev.txt
python -m pip install --upgrade -e ".[dev]"

- name: Install Node Dependencies
shell: bash
Expand Down Expand Up @@ -78,18 +76,7 @@ jobs:
echo "::endgroup::"

echo "::group::Run Python Tests"
python -m pytest \
-rxXs \
--tb=native \
--verbose \
--color=yes \
--cov=actions \
--cov-report=term \
--cov-report=xml:coverage/python-coverage.xml \
--cov-report=json:coverage/python-coverage.json \
--junitxml=junit-python.xml \
-o junit_family=legacy \
tests
python -m pytest
echo "::endgroup::"

- name: Test with Jest
Expand Down
2 changes: 1 addition & 1 deletion actions/facebook_post/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN python -m pip install --no-cache-dir --upgrade pip setuptools wheel
COPY . /app

WORKDIR /app
RUN python -m pip install --no-cache-dir --upgrade -r requirements.txt
RUN python -m pip install --no-cache-dir --upgrade .

# github will mount the `GITHUB_WORKSPACE` directory to /github/workspace
# https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#workdir
Expand Down
18 changes: 18 additions & 0 deletions actions/facebook_post/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "lizardbyte-actions-facebook-post"
version = "0.0.0"
description = "Facebook post action for GitHub workflows."
requires-python = ">=3.12"

dependencies = [
"python-dotenv==1.2.1",
"requests==2.32.5",
]

[tool.setuptools.packages.find]
where = ["."]
include = []
2 changes: 0 additions & 2 deletions actions/facebook_post/requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion actions/release_homebrew/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ runs:
run: |
echo "::group::Install Python Requirements"
# install requirements required for this action to complete
"${{ steps.venv.outputs.python-path }}" -m pip install -r requirements.txt
"${{ steps.venv.outputs.python-path }}" -m pip install .
echo "::endgroup::"

- name: Checkout (org homebrew repo)
Expand Down
17 changes: 17 additions & 0 deletions actions/release_homebrew/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "lizardbyte-actions-release-homebrew"
version = "0.0.0"
description = "Release Homebrew action for GitHub workflows."
requires-python = ">=3.11"

dependencies = [
"python-dotenv==1.2.1",
]

[tool.setuptools.packages.find]
where = ["."]
include = []
1 change: 0 additions & 1 deletion actions/release_homebrew/requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion actions/release_setup/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN python -m pip install --no-cache-dir --upgrade pip setuptools wheel
COPY . /app

WORKDIR /app
RUN python -m pip install --no-cache-dir --upgrade -r requirements.txt
RUN python -m pip install --no-cache-dir --upgrade .

# github will mount the `GITHUB_WORKSPACE` directory to /github/workspace
# https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#workdir
Expand Down
18 changes: 18 additions & 0 deletions actions/release_setup/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "lizardbyte-actions-release-setup"
version = "0.0.0"
description = "Release setup action for GitHub workflows."
requires-python = ">=3.12"

dependencies = [
"python-dotenv==1.2.1",
"requests==2.32.5",
]

[tool.setuptools.packages.find]
where = ["."]
include = []
2 changes: 0 additions & 2 deletions actions/release_setup/requirements.txt

This file was deleted.

3 changes: 2 additions & 1 deletion actions/setup_python/post-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ if [[ -n "$WITH_PARAMS" ]]; then

# setup python
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade -r requirements-dev.txt
python -m pip install --upgrade "${SCRIPT_DIR}[dev]"

python -m pytest \
-rxXs \
--tb=native \
--verbose \
--color=yes \
-c "${SCRIPT_DIR}/pyproject.toml" \
tests/setup_python
else
echo "Error: WITH_PARAMS environment variable not set" >&2
Expand Down
23 changes: 23 additions & 0 deletions actions/setup_python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "lizardbyte-actions-setup-python"
version = "0.0.0"
description = "Setup Python action for GitHub workflows."

dependencies = []

[project.optional-dependencies]
dev = [
"pytest==4.6.11;python_version<'3.5'",
"pytest==6.1.2;python_version>='3.5' and python_version<'3.6'",
"pytest==7.0.1;python_version>='3.6' and python_version<'3.7'",
"pytest==8.3.5;python_version>='3.7' and python_version<'3.9'",
"pytest==9.0.2;python_version>='3.9'",
]

[tool.setuptools.packages.find]
where = ["."]
include = []
13 changes: 13 additions & 0 deletions actions/setup_python/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from setuptools import setup

setup(
extras_require={
"dev": [
"pytest==4.6.11;python_version<'3.5'",
"pytest==6.1.2;python_version>='3.5' and python_version<'3.6'",
"pytest==7.0.1;python_version>='3.6' and python_version<'3.7'",
"pytest==8.3.5;python_version>='3.7' and python_version<'3.9'",
"pytest==9.0.2;python_version>='3.9'",
],
},
)
19 changes: 19 additions & 0 deletions actions/setup_virtual_desktop/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "lizardbyte-actions-setup-virtual-desktop"
version = "0.0.0"
description = "Setup virtual desktop action for GitHub workflows."
requires-python = ">=3.12"

dependencies = [
# PyGObject provides Python bindings for GObject-based libraries like GTK and AppIndicator
# Only install on Linux where AppIndicator/Ayatana is available
"pygobject==3.54.5;sys_platform=='linux'",
]

[tool.setuptools.packages.find]
where = ["."]
include = []
4 changes: 0 additions & 4 deletions actions/setup_virtual_desktop/requirements.txt

This file was deleted.

70 changes: 70 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "lizardbyte-actions"
version = "0.0.0"
description = "Reusable actions for GitHub workflows."
readme = "README.md"
license = "MIT"
authors = [
{name = "LizardByte", email = "lizardbyte@users.noreply.github.com"}
]

dependencies = [
"lizardbyte-actions-facebook-post @ file:./actions/facebook_post",
"lizardbyte-actions-release-homebrew @ file:./actions/release_homebrew",
"lizardbyte-actions-release-setup @ file:./actions/release_setup",
]

[project.optional-dependencies]
dev = [
"pytest==9.0.2",
"pytest-cov==7.0.0",
]

[project.urls]
Homepage = "https://github.com/LizardByte/actions#readme"
Repository = "https://github.com/LizardByte/actions"
Issues = "https://github.com/LizardByte/actions/issues"

[tool.setuptools.packages.find]
include = ["actions*"]

[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-rxXs",
"--tb=native",
"--verbose",
"--color=yes",
"--cov=actions",
"--cov-report=term",
"--cov-report=xml:coverage/python-coverage.xml",
"--cov-report=json:coverage/python-coverage.json",
"--junitxml=junit-python.xml",
"-o", "junit_family=legacy",
]

[tool.coverage.run]
source = ["actions"]
omit = [
"*/tests/*",
"*/__pycache__/*",
]

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"@abstractmethod",
]
6 changes: 0 additions & 6 deletions requirements-dev.txt

This file was deleted.

3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

Loading