-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
79 additions
and
6 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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
name: Python | ||
name: test | ||
|
||
on: [push] | ||
on: [push, pull_request, release] | ||
|
||
jobs: | ||
test: | ||
build: | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | ||
|
@@ -19,8 +20,6 @@ jobs: | |
python -m pip install --upgrade pip | ||
sudo apt-get install -y graphviz | ||
pip install tox "poetry>=1.4" coveralls | ||
git --version | ||
git submodule --help | ||
- name: TOX | ||
run: tox | ||
- name: Upload coverage data to coveralls.io | ||
|
@@ -32,7 +31,7 @@ jobs: | |
|
||
coveralls: | ||
name: Indicate completion to coveralls.io | ||
needs: test | ||
needs: build | ||
runs-on: ubuntu-latest | ||
container: python:3-slim | ||
steps: | ||
|
@@ -42,3 +41,14 @@ jobs: | |
coveralls --service=github --finish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
publish: | ||
if: github.event_name == 'push' && github.ref_type == 'tag' | ||
needs: coveralls | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build and publish to pypi | ||
uses: JRubics/[email protected] | ||
with: | ||
pypi_token: ${{ secrets.PYPI_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Contribute | ||
|
||
## Branches | ||
|
||
* `2.x.x` main line for 2.x.x | ||
* `3.x.x` actual main line | ||
* documentation links refer to `3.x.x` | ||
* `main` | ||
* documentation links refer to `latest` | ||
|
||
## Testing | ||
|
||
### Create Environment | ||
|
||
Run these commands just the first time: | ||
|
||
```bash | ||
# Ensure python3 is installed | ||
python3 -m venv .venv | ||
source .venv/bin/activate | ||
pip install tox "poetry>=1.4" "crashtest==0.4.1" | ||
``` | ||
|
||
### Enter Environment | ||
|
||
Run this command once you open a new shell: | ||
|
||
```bash | ||
source .venv/bin/activate | ||
``` | ||
|
||
### Test Your Changes | ||
|
||
```bash | ||
# test | ||
tox | ||
``` | ||
|
||
### Release | ||
|
||
```bash | ||
git pull | ||
|
||
prev_version=$(poetry version -s) | ||
|
||
# Version Bump | ||
poetry version minor | ||
# OR | ||
poetry version patch | ||
|
||
# Commit, Tag and Push | ||
version=$(poetry version -s) | ||
|
||
sed "s/$prev_version/$version/g" -i README.rst | ||
sed "s/$prev_version/$version/g" -i docs/index.rst | ||
|
||
git commit -m"version bump to ${version}" pyproject.toml README.rst docs/index.rst | ||
git tag "${version}" -m "Release ${version}" | ||
git push | ||
git push --tags | ||
|
||
# Publishing is handled by CI | ||
``` |