Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding github workflow #3

Merged
merged 7 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
on:
push:
branches:
- master
tags:
- "^[0-9]+.[0-9]+.[0-9]+"

jobs:
build_and_deploy:
uses: sensirion/.github/.github/workflows/driver.python.pypi_publish.yml@main
secrets:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}

14 changes: 14 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Publish Documentation
on:
push:
branches:
- master
tags:
- "^[0-9]+.[0-9]+.[0-9]+"

jobs:
documentation:
uses: sensirion/.github/.github/workflows/driver.python.documentation.yml@main
with:
run-environment: "ubuntu-20.04"
build-python-version: 3.6
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Validate and Test Python Package
on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
test:
uses: sensirion/.github/.github/workflows/driver.python.test.yml@main
with:
hw-test-flag: (needs_serialport or needs_tcp)


69 changes: 0 additions & 69 deletions .gitlab-ci.yml

This file was deleted.

16 changes: 0 additions & 16 deletions ci/set_git_config.sh

This file was deleted.

4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
'flake8~=3.7.8',
'intelhex~=2.0', # from the "fwupdate" extra
'mock~=3.0.0',
'pytest~=4.6.11',
'pytest-cov~=2.12.1',
'pytest~=6.2.5',
'pytest-cov~=3.0.0',
]
},
classifiers=[
Expand Down
2 changes: 1 addition & 1 deletion tests/commands/baudrate/test_get_baudrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ def test_interpret_response(input, expected_baudrate):
cmd = ShdlcCmdGetBaudrate()
cmd.check_response_length(input)
address = cmd.interpret_response(input)
assert type(address) == type(expected_baudrate)
assert type(address) is type(expected_baudrate)
assert address == expected_baudrate
4 changes: 2 additions & 2 deletions tests/commands/error_state/test_get_error_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def test_interpret_response(input, expected_state, expected_last_error):
cmd = ShdlcCmdGetErrorState(clear=False)
cmd.check_response_length(input)
state, last_error = cmd.interpret_response(input)
assert type(state) == type(expected_state)
assert type(last_error) == type(expected_last_error)
assert type(state) is type(expected_state)
assert type(last_error) is type(expected_last_error)
assert state == expected_state
assert last_error == expected_last_error
2 changes: 1 addition & 1 deletion tests/commands/reply_delay/test_get_reply_delay.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ def test_interpret_response(input, expected_address):
cmd = ShdlcCmdGetReplyDelay()
cmd.check_response_length(input)
address = cmd.interpret_response(input)
assert type(address) == type(expected_address)
assert type(address) is type(expected_address)
assert address == expected_address
2 changes: 1 addition & 1 deletion tests/commands/slave_address/test_get_slave_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ def test_interpret_response(input, expected_address):
cmd = ShdlcCmdGetSlaveAddress()
cmd.check_response_length(input)
address = cmd.interpret_response(input)
assert type(address) == type(expected_address)
assert type(address) is type(expected_address)
assert address == expected_address
2 changes: 1 addition & 1 deletion tests/commands/system_up_time/test_get_system_up_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ def test_interpret_response(input, expected_time):
cmd = ShdlcCmdGetSystemUpTime()
cmd.check_response_length(input)
time = cmd.interpret_response(input)
assert type(time) == type(expected_time)
assert type(time) is type(expected_time)
assert time == expected_time
Loading