diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..72d41f1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: + +jobs: + tests: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + version: 1.8.3 + virtualenvs-create: false + - name: Install dependencies + run: poetry install + - name: Run tests + run: pytest diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 42df9cb..29c6f72 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,9 @@ -name: Build and publish on PyPI +name: Build and publish on PyPI (disabled) +# Disabled automatic triggers to prevent publishing to PyPI. To run manually, +# trigger the workflow via "Run workflow" in the GitHub UI. on: - push + workflow_dispatch: jobs: tests: diff --git a/pyproject.toml b/pyproject.toml index 6e09cf9..be43587 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,10 +41,13 @@ line-length = 120 [tool.isort] line_length = 120 profile = "black" +[tool.pytest.ini_options] +pythonpath = ["."] + [build-system] requires = ["poetry-core>=1.0.8"] build-backend = "poetry.core.masonry.api" [project.urls] Homepage = "https://github.com/Bl3f/yato" Repository = "https://github.com/Bl3f/yato" -Issues = "https://github.com/Bl3f/yato/issues" \ No newline at end of file +Issues = "https://github.com/Bl3f/yato/issues"