Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: initial project scaffolding #2

Merged
merged 3 commits into from
Nov 21, 2024
Merged
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
66 changes: 66 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Test

on:
push:
branches: [main]
pull_request:
branches: [main, "release/*"]

jobs:
check-dependencies:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.12"]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Install poetry
run: pipx install poetry

- name: Set up Python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
cache-dependency-path: "poetry.lock"

- name: Check dependencies
run: |
poetry lock --no-update
git diff --exit-code
test:
strategy:
matrix:
python-version: ["3.12"]
runs-on: ubuntu-latest

steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Install poetry
run: pipx install poetry

- name: Set up Python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
cache-dependency-path: "poetry.lock"

- name: Install Python dependencies
run: poetry install

- name: Run Test
run: poetry run pytest --cov=quipucordsctl --cov-report=xml

- name: Report coverage
if: ${{ success() }}
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true # optional (default = false)
token: ${{ secrets.CODECOV_TOKEN }} # required
# verbose: true # optional (default = false)
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.coverage
coverage.xml

Empty file added .noai
Empty file.
Empty file added .packit.yaml
Empty file.
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12.5
264 changes: 264 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[tool.poetry]
name = "quipucordsctl"
version = "0.1.0"
description = "Utility for installing and managing a local quipucords server."
authors = ["Brad Smith <[email protected]>"]
license = "GPLv3"
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.12"

[tool.poetry.group.dev.dependencies]
ruff = "^0"
pytest = "^8.3.3"
coverage = "^7.6.7"
pytest-cov = "^6.0.0"
Faker = "^33.0.0"
setuptools = "^75.5.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Empty file added quipucordsctl.spec
Empty file.
Empty file added quipucordsctl/__init__.py
Empty file.
1 change: 1 addition & 0 deletions quipucordsctl/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print("quipucordsctl is coming soon! :)")
Empty file added setup.py
Empty file.
Empty file added tests/__init__.py
Empty file.
2 changes: 2 additions & 0 deletions tests/test_main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def test_main():
from quipucordsctl import main # noqa: F401