Skip to content

Commit

Permalink
fix: test builds and update toml to include this branch
Browse files Browse the repository at this point in the history
  • Loading branch information
jjjermiah committed Mar 15, 2024
1 parent aa1dcb4 commit af61beb
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 53 deletions.
104 changes: 52 additions & 52 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit af61beb

Please sign in to comment.