Skip to content

Commit

Permalink
Merge pull request #4 from siddarth-patil/release-workflow-update
Browse files Browse the repository at this point in the history
[WORKFLOW] Adding tests step to release workflow
  • Loading branch information
siddarth-patil authored Dec 31, 2024
2 parents 7b0a8be + 840b3dd commit 7ababf0
Showing 1 changed file with 32 additions and 7 deletions.
39 changes: 32 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,36 @@ jobs:
exit 1
fi
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 - --version 1.8.3
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
poetry add tox-gh-actions
poetry install --sync --no-interaction
- name: Run Tests in Parallel with Tox
run: poetry run tox -p

check_pypi:
needs: details
needs: [ details, test ]
runs-on: ubuntu-latest
steps:
- name: Fetch information from PyPI
Expand All @@ -67,7 +95,7 @@ jobs:
fi
setup_and_build:
needs: [ details, check_pypi ]
needs: [ check_pypi ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -89,9 +117,6 @@ jobs:
- name: Install dependencies
run: poetry install --sync --no-interaction

- name: Run Tests in parallel
run: poetry run tox

- name: Build source and wheel distribution
run: |
poetry build
Expand All @@ -104,7 +129,7 @@ jobs:

pypi_publish:
name: Upload release to PyPI
needs: [ setup_and_build, details ]
needs: [ setup_and_build ]
runs-on: ubuntu-latest
environment:
name: pypi
Expand All @@ -122,7 +147,7 @@ jobs:

github_release:
name: Create GitHub Release
needs: [ setup_and_build, details ]
needs: [ setup_and_build ]
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down

0 comments on commit 7ababf0

Please sign in to comment.