Skip to content

Commit

Permalink
changes to ci-cd file - added pycov token
Browse files Browse the repository at this point in the history
MarekB19 committed Jan 30, 2025
1 parent a9b1def commit 886a75c
Showing 2 changed files with 9 additions and 10 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "{{ cookiecutter.python_version }}"

- name: Check-out repository
uses: actions/checkout@v3
@@ -24,12 +24,12 @@ jobs:
run: poetry install

- name: Test with pytest
run: poetry run pytest tests/ --cov=pysorting --cov-report=xml
run: poetry run pytest tests/ --cov={{ cookiecutter.__package_slug }} --cov-report=xml

- name: Use Codecov to track coverage
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
token: {% raw %}${{ secrets.CODECOV_TOKEN }}{% endraw %}
files: ./coverage.xml # coverage report

- name: Build documentation
@@ -54,7 +54,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "{{ cookiecutter.python_version }}"

- name: Check-out repository
uses: actions/checkout@v3
@@ -65,31 +65,31 @@ jobs:
id: release
uses: python-semantic-release/python-semantic-release@v8.3.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}

- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: steps.release.outputs.released == 'true'
with:
repository-url: https://test.pypi.org/legacy/
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
password: {% raw %}${{ secrets.TEST_PYPI_API_TOKEN }}{% endraw %}

- name: Test install from TestPyPI
if: steps.release.outputs.released == 'true'
run: |
pip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple \
pysorting
{{ cookiecutter.__package_slug }}
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: steps.release.outputs.released == 'true'
with:
password: ${{ secrets.PYPI_API_TOKEN }}
password: {% raw %}${{ secrets.PYPI_API_TOKEN }}{% endraw %}

- name: Publish package distributions to GitHub Releases
uses: python-semantic-release/upload-to-gh-release@main
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
1 change: 0 additions & 1 deletion tests/test_pysorting.py

This file was deleted.

0 comments on commit 886a75c

Please sign in to comment.