diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..e38f6e67 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,17 @@ +name: Python package +on: + push: + tags: + - "v*.*.*" +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Publish to pypi + uses: coveooss/pypi-publish-with-poetry@v1.0.0 + with: + project-name: cfgnet + pypi-token: ${{ secrets.PYPI_TOKEN }} + + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 1037edde..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,27 +0,0 @@ -on: - push: - tags: - - 'v*.*.*' - -name: Upload Release Assets - -jobs: - build: - name: Upload Release Assets - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Install Poetry - uses: dschep/install-poetry-action@v1.2 - - name: Build project - run: | - poetry build - - name: Create Release - id: create_release - uses: softprops/action-gh-release@v1 - with: - files: | - ./dist/* - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/tests/vcs/test_git.py b/tests/vcs/test_git.py deleted file mode 100644 index 9546f285..00000000 --- a/tests/vcs/test_git.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/env python3 - -# This file is part of the CfgNet module. -# -# This program is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation, either version 3 of the License, or (at your option) any later -# version. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along with -# this program. If not, see . - -import os - -from src.cfgnet.vcs.git import Git -from src.cfgnet.vcs.git_history import GitHistory - -ROOT_DIR = os.path.dirname(os.path.abspath("CfgNet")) - - -def test_init_git_repo(): - repo = Git(project_root=ROOT_DIR) - history = GitHistory(repo) - - assert repo is not None - assert history.commits is not None - assert history.commit_index is not None - assert not history.has_next_commit() - assert len(repo.get_tracked_files()) > 0