Skip to content

Commit

Permalink
Improved CI/CD pipeline run time through optimized caching
Browse files Browse the repository at this point in the history
  • Loading branch information
majiidd committed Nov 8, 2024
1 parent 4c9e466 commit 200b060
Show file tree
Hide file tree
Showing 7 changed files with 305 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto eol=lf
*.bat text eol=crlf
12 changes: 5 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ jobs:
name: ${{matrix.os}} / ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-3.9', 'pypy-3.10']
Expand All @@ -20,26 +21,23 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pipenv'

- name: Display Python version
run: python --version

- name: Get python path
id: python-path
run: |
echo "P_PATH=$(python -c 'import sys; print(sys.executable)')" >> $GITHUB_ENV
- name: Install pipenv
run: |
python -m pip install pipenv
- name: Install dependencies
env:
PIPENV_DEFAULT_PYTHON_VERSION: ${{ matrix.python-version }}
PIPENV_NOSPIN: "1"
PYTHONIOENCODING: "utf-8"
GIT_ASK_YESNO: "false"
run: |
pipenv install --dev --python=${{ env.P_PATH }}
pipenv install --dev
- name: Run tests
env:
Expand Down Expand Up @@ -80,7 +78,7 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/
verbose: true

- name: Publish to PyPI
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ ipython_config.py
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
Pipfile.lock
# Pipfile.lock

# celery beat schedule file
celerybeat-schedule
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

# Changelog

## [5.1.0](https://github.com/majiidd/persiantools/compare/5.0.0...5.1.0) - 2024-11-08

- Improved CI/CD pipeline run time through optimized caching.

## [5.0.0](https://github.com/majiidd/persiantools/compare/4.2.0...5.0.0) - 2024-11-08

- Dropped Python 3.8 support; added Python 3.13 compatibility.
Expand Down
291 changes: 291 additions & 0 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion persiantools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

__title__ = "persiantools"
__url__ = "https://github.com/majiidd/persiantools"
__version__ = "5.0.0"
__version__ = "5.1.0"
__build__ = __version__
__author__ = "Majid Hajiloo"
__author_email__ = "[email protected]"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_jalalidate.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import pytest

from persiantools.jdatetime import JalaliDate, MINYEAR, MAXYEAR
from persiantools.jdatetime import MAXYEAR, MINYEAR, JalaliDate


class TestJalaliDate(TestCase):
Expand Down

0 comments on commit 200b060

Please sign in to comment.