-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from hokus15/develop
build(actions): replace travis by github actions
- Loading branch information
Showing
12 changed files
with
175 additions
and
36 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,19 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "06:00" | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
time: "06:15" | ||
commit-message: | ||
prefix: "build" | ||
include: "scope" | ||
labels: | ||
- dependencies | ||
open-pull-requests-limit: 10 | ||
rebase-strategy: auto |
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,55 @@ | ||
name: Test & Release | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
test: | ||
name: Python ${{ matrix.python-version }} tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 | ||
pip install -r requirements.txt | ||
- name: Lint with flake8 | ||
run: | | ||
flake8 . | ||
- name: Test with unittest | ||
run: | | ||
python -m unittest discover -s test -p "test_*.py" | ||
release: | ||
name: Semantic Release | ||
runs-on: ubuntu-latest | ||
concurrency: push | ||
needs: test | ||
permissions: | ||
contents: write | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing in PyPi | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Python Semantic Release | ||
id: release | ||
uses: python-semantic-release/python-semantic-release@v9.1.1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Publish package distributions to GitHub Releases | ||
id: github-release | ||
uses: python-semantic-release/upload-to-gh-release@main | ||
if: steps.release.outputs.released == 'true' | ||
with: | ||
github_token: ${{ secrets.GITHUB_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,32 @@ | ||
on: | ||
push: | ||
branches: | ||
- '!master' | ||
pull_request: | ||
jobs: | ||
test: | ||
name: Python ${{ matrix.python-version }} tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 | ||
pip install -r requirements.txt | ||
- name: Lint with flake8 | ||
run: | | ||
flake8 . | ||
- name: Test with unittest | ||
run: | | ||
python -m unittest discover -s test -p "test_*.py" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,11 @@ | ||
{ | ||
"python.testing.unittestArgs": [ | ||
"-v", | ||
"-s", | ||
"./test", | ||
"-p", | ||
"test*.py" | ||
], | ||
"python.testing.pytestEnabled": false, | ||
"python.testing.unittestEnabled": true | ||
} |
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
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,46 @@ | ||
[build-system] | ||
requires = ["setuptools", "setuptools-scm", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "iotconnect" | ||
version = "0.4.1" | ||
authors = [ | ||
{name = "Jordi Morell", email = "hokus@hotmail.com"}, | ||
] | ||
description = "Extensible Internet Of Things integration service written in Python that can be run in a Raspberry Pi Zero W." | ||
readme = "README.md" | ||
requires-python = ">=3.7" | ||
license = {text = "MIT"} | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
] | ||
dependencies = [ | ||
"requests==2.31.0", | ||
] | ||
|
||
[tool.semantic_release] | ||
logging_use_named_masks = true | ||
tag_format = "v{version}" | ||
commit_parser = "angular" | ||
commit_author = "semantic-release <semantic-release>" | ||
commit_message = "{version}\n\nAutomatically generated by python-semantic-release" | ||
build_command = """ | ||
python -m pip install build~=0.10.0 | ||
python -m build . | ||
""" | ||
major_on_zero = true | ||
assets = [] | ||
version_variables = ["iotconnect/__version__.py:__version__"] | ||
version_toml = ["pyproject.toml:project.version"] | ||
|
||
[tool.semantic_release.publish] | ||
dist_glob_patterns = ["dist/*"] | ||
upload_to_vcs_release = true |
Empty file.
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,11 @@ | ||
import unittest | ||
|
||
|
||
class IOTConnectTestCase(unittest.TestCase): | ||
|
||
def test_ioconnect(self): | ||
self.assertTrue(True) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |