From af61beba9a677a86695268a55bd2887138fb2c59 Mon Sep 17 00:00:00 2001 From: Jermiah Date: Fri, 15 Mar 2024 20:27:10 +0000 Subject: [PATCH] fix: test builds and update toml to include this branch --- .github/workflows/ci-cd.yml | 104 ++++++++++++++++++------------------ pyproject.toml | 4 +- 2 files changed, 55 insertions(+), 53 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index c8d8df0..bebd7d3 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -3,36 +3,36 @@ name: ci-cd on: [push, pull_request] jobs: - ci: - # Set up operating system - runs-on: ubuntu-latest + # ci: + # # Set up operating system + # runs-on: ubuntu-latest - # Define job steps - steps: - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.9" + # # Define job steps + # steps: + # - name: Set up Python + # uses: actions/setup-python@v4 + # with: + # python-version: "3.9" - - name: Check-out repository - uses: actions/checkout@v3 + # - name: Check-out repository + # uses: actions/checkout@v3 - - name: Install poetry - uses: snok/install-poetry@v1 + # - name: Install poetry + # uses: snok/install-poetry@v1 - - name: Install package - run: poetry install + # - name: Install package + # run: poetry install - - name: Test with pytest - run: poetry run pytest tests/ --cov=readii --cov-report=xml + # - name: Test with pytest + # run: poetry run pytest tests/ --cov=readii --cov-report=xml - - name: Use Codecov to track coverage - uses: codecov/codecov-action@v3 - with: - files: ./coverage.xml # coverage report + # - name: Use Codecov to track coverage + # uses: codecov/codecov-action@v3 + # with: + # files: ./coverage.xml # coverage report - - name: Build documentation - run: poetry run make html --directory docs/ + # - name: Build documentation + # run: poetry run make html --directory docs/ cd: # Only run this job if the "ci" job passes @@ -76,35 +76,35 @@ jobs: echo "${{ steps.release.outputs.tag }}" - - name: Install packaging-related tool - run: - python3 -m pip install build twine - - - name: Build package - run: | - poetry version $(git describe --tags --abbrev=0 | sed 's/^v//') - python -m build --sdist --wheel --outdir dist/ . - ls dist/ - - - name: Publish to TestPyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ - - - name: Test install from TestPyPI - run: | - pip install \ - --index-url https://test.pypi.org/simple/ \ - --extra-index-url https://pypi.org/simple \ - readii - - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} + # - name: Install packaging-related tool + # run: + # python3 -m pip install build twine + + # - name: Build package + # run: | + # poetry version $(git describe --tags --abbrev=0 | sed 's/^v//') + # python -m build --sdist --wheel --outdir dist/ . + # ls dist/ + + # - name: Publish to TestPyPI + # uses: pypa/gh-action-pypi-publish@release/v1 + # with: + # user: __token__ + # password: ${{ secrets.TEST_PYPI_API_TOKEN }} + # repository-url: https://test.pypi.org/legacy/ + + # - name: Test install from TestPyPI + # run: | + # pip install \ + # --index-url https://test.pypi.org/simple/ \ + # --extra-index-url https://pypi.org/simple \ + # readii + + # - name: Publish to PyPI + # uses: pypa/gh-action-pypi-publish@release/v1 + # with: + # user: __token__ + # password: ${{ secrets.PYPI_API_TOKEN }} - name: Set up QEMU if: steps.release.outputs.released == 'true' diff --git a/pyproject.toml b/pyproject.toml index 4be2a0b..08e2376 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,13 +29,15 @@ python-semantic-release = "^8.5.2" [tool.semantic_release] version_toml = ["pyproject.toml:tool.poetry.version"] # version location -branch = "main" # branch to make releases of changelog_file = "CHANGELOG.md" # changelog file dist_path = "dist/" # where to put dists upload_to_release = true # auto-create GitHub release remove_dist = false # don't remove dists patch_without_tag = true # patch release by default +[tool.semantic_release.branches] +include = ["main", "dockerfile"] # only release from these branches + [tool.poetry.scripts] readii = "readii.pipeline:main"