-
Notifications
You must be signed in to change notification settings - Fork 3
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
11 changed files
with
1,394 additions
and
674 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Release to PyPI | ||
on: | ||
release: | ||
types: [published] | ||
push: | ||
tags: | ||
- v*.*.* | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install Poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.2 | ||
- name: Verify versioning | ||
run: | | ||
[ "$(poetry version -s)" == "${GITHUB_REF#refs/tags/v}" ] | ||
- name: Install dependencies | ||
run: poetry install | ||
- name: Run tests | ||
run: poetry run pytest | ||
- name: Build packages | ||
run: poetry build | ||
- name: Configure Poetry | ||
run: | | ||
poetry config repositories.testpypi https://test.pypi.org/legacy/ | ||
poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
poetry config pypi-token.pypi "${{ secrets.PYPI_API_TOKEN }}" | ||
- name: Publish to test PyPI | ||
if: ${{ github.event_name == 'push' }} | ||
run: poetry publish -r testpypi | ||
- name: Publish to PyPI | ||
if: ${{ github.event_name == 'release' }} | ||
run: poetry publish |
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,43 @@ | ||
name: Test | ||
on: | ||
push: | ||
branches: [ "*" ] | ||
pull_request: | ||
branches: [ "*" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
os: [ 'ubuntu-20.04' ] | ||
python-version: [ '3.8', '3.9', '3.10' ] | ||
poetry-version: [ '1.2' ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: ${{ matrix.poetry-version }} | ||
- name: Install dependencies | ||
run: poetry install | ||
- name: Run tests | ||
run: poetry run pytest --cov=sigma --cov-report term --cov-report xml:cov.xml -vv | ||
- name: Store coverage for badge | ||
if: ${{ runner.os == 'Linux' }} | ||
run: poetry run python print-coverage.py >> $GITHUB_ENV | ||
- name: Create coverage badge | ||
if: ${{ github.repository == 'wagga40/pySigma-backend-sqlite' && github.event_name == 'push' && runner.os == 'Linux' }} | ||
uses: schneegans/[email protected] | ||
with: | ||
auth: ${{ secrets.GIST_SECRET }} | ||
gistID: GitHub Gist identifier containing coverage badge JSON expected by shields.io. | ||
filename: wagga40-pySigma-backend-sqlite.json | ||
label: Coverage | ||
message: ${{ env.COVERAGE }} | ||
color: ${{ env.COVERAGE_COLOR }} |
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,177 @@ | ||
.coverage* | ||
.vscode/ | ||
**/__pycache__ | ||
.pytest_cache/ | ||
cov.xml | ||
dist/ | ||
docs/_build | ||
.venv/ | ||
|
||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
docs/site | ||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# 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 | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
/venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
.vscode/ | ||
caches/ | ||
.idea/ | ||
__pypackages__ | ||
.pdm.toml | ||
.pdm-python | ||
temp.py | ||
|
||
# Pyannotate generated stubs | ||
type_info.json | ||
.pdm-build/ | ||
src/pdm/models/VERSION |
Oops, something went wrong.