-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/piotrmaslanka/satella in…
…to develop
- Loading branch information
Showing
1 changed file
with
34 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,22 +2,27 @@ name: build-satella | |
run-name: ${{ github.actor }} | ||
on: [ push ] | ||
jobs: | ||
modify-version: | ||
runs-on: "ubuntu-latest" | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
steps: | ||
- name: Alter Version | ||
run: | | ||
echo "__version__=\"$(python -c \"import satella; print(satella.__version__)\")" > satella/__init__.py | ||
echo "Doing version $(python -c \"import satella; print(satella.__version__)\")" | ||
prepare-system: | ||
needs: ["modify-system"] | ||
runs-on: "ubuntu-latest" | ||
strategy: | ||
matrix: | ||
python-version: [ "3.9" ] | ||
steps: | ||
- uses: actions/checkout@4 | ||
- uses: actions/setup-python@4 | ||
with: | ||
python-version: $${{ matrix.version }} | ||
- name: Install everything | ||
run: pip install -e .[test,dev,extras] | ||
with: | ||
python-version: '${{ matrix.python-version }}' | ||
cache: 'pip' | ||
paths: ["dist/*"] | ||
tests: | ||
runs-on: ubuntu-latest | ||
needs: ["modify-system"] | ||
strategy: | ||
matrix: | ||
python-version: [ "3.6", "3.7", "3.8", "pypy3.9", "pypy3.10", "3.9", "3.10", "3.11", "3.12" ] | ||
|
@@ -32,18 +37,29 @@ jobs: | |
with: | ||
python-version: '${{ matrix.python-version }}' | ||
cache: 'pip' | ||
build-package: | ||
needs: ["prepare-system"] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Build package | ||
run: python -m build . | ||
- name: Store credentials | ||
run: | | ||
echo $PYPIRC_PASSWORD_DATA > ~/.pypirc | ||
twine upload dist/* | ||
convert-and-upload-coverage: | ||
upload-coverage: | ||
runs-on: "ubuntu-latest" | ||
needs: ["build-package", "tests"] | ||
steps: | ||
- run: coverage xml | ||
- uses: caffco/[email protected] | ||
build-project: | ||
runs-on: "ubuntu-latest" | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
strategy: | ||
matrix: | ||
python-version: [ "3.6", "3.7", "3.8", "pypy3.9", "pypy3.10", "3.9", "3.10", "3.11", "3.12" ] | ||
steps: | ||
- name: Build | ||
run: python -m build . | ||
send-to-pypi: | ||
runs-on: "ubuntu-latest" | ||
needs: ["build-project"] | ||
steps: | ||
- name: Install Twine | ||
run: pip install twine | ||
- name: Send over packages to PyPI | ||
run: | | ||
echo PYPIRC_PASSWORD_DATA > ~/.pypirc | ||
twine upload dist/* | ||