mirror of
https://github.com/pimoroni/grow-python
synced 2025-10-25 15:19:23 +00:00
CI: Fix CI workflow.
This commit is contained in:
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python: [3.5, 3.6, 3.7, 3.8]
|
||||
python: [3.7, 3.9]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -33,5 +33,5 @@ jobs:
|
||||
run: |
|
||||
python -m pip install coveralls
|
||||
coveralls --service=github
|
||||
if: ${{ matrix.python == '3.8' }}
|
||||
if: ${{ matrix.python == '3.9' }}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ def test_moisture_setup(GPIO, smbus):
|
||||
ch2 = Moisture(channel=2)
|
||||
ch3 = Moisture(channel=3)
|
||||
|
||||
assert GPIO.setup.has_calls([
|
||||
GPIO.setup.assert_has_calls([
|
||||
mock.call(ch1._gpio_pin, GPIO.IN),
|
||||
mock.call(ch2._gpio_pin, GPIO.IN),
|
||||
mock.call(ch3._gpio_pin, GPIO.IN)
|
||||
@@ -34,14 +34,17 @@ def test_pump_setup(GPIO, smbus):
|
||||
ch2 = Pump(channel=2)
|
||||
ch3 = Pump(channel=3)
|
||||
|
||||
assert GPIO.setup.has_calls([
|
||||
GPIO.setup.assert_has_calls([
|
||||
mock.call(ch1._gpio_pin, GPIO.OUT, initial=GPIO.LOW),
|
||||
mock.call(ch2._gpio_pin, GPIO.OUT, initial=GPIO.LOW),
|
||||
mock.call(ch3._gpio_pin, GPIO.OUT, initial=GPIO.LOW)
|
||||
])
|
||||
|
||||
assert GPIO.PWM.has_calls([
|
||||
GPIO.PWM.assert_has_calls([
|
||||
mock.call(ch1._gpio_pin, PUMP_PWM_FREQ),
|
||||
mock.call().start(0),
|
||||
mock.call(ch2._gpio_pin, PUMP_PWM_FREQ),
|
||||
mock.call(ch3._gpio_pin, PUMP_PWM_FREQ)
|
||||
mock.call().start(0),
|
||||
mock.call(ch3._gpio_pin, PUMP_PWM_FREQ),
|
||||
mock.call().start(0)
|
||||
])
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
[tox]
|
||||
envlist = py{35,37},qa
|
||||
envlist = py{37,38,39},qa
|
||||
skip_missing_interpreters = True
|
||||
|
||||
[testenv]
|
||||
commands =
|
||||
python setup.py install
|
||||
coverage run -m py.test -v -r wsx
|
||||
coverage run -m pytest -v -r wsx
|
||||
coverage report
|
||||
deps =
|
||||
mock
|
||||
|
||||
Reference in New Issue
Block a user