Skip to content

Commit b6cc517

Browse files
[skip-changelog] Remove python testsuite and the related workflow (#2011)
* Remove python testsuite and the related workflows * Update documentation according to the removal of the python testsuite * Remove `check-python-task` and the related unused dependencies
1 parent f850706 commit b6cc517

35 files changed

+223
-5864
lines changed

Diff for: .flake8

-16
This file was deleted.

Diff for: .github/tools/get_integration_tests.py

-11
This file was deleted.

Diff for: .github/workflows/check-python-task.yml

-86
This file was deleted.

Diff for: .github/workflows/test-go-integration-task.yml

-124
This file was deleted.

Diff for: README.md

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Arduino CLI is an all-in-one solution that provides Boards/Library Managers, ske
66
and many other tools needed to use any Arduino compatible board and platform from command line or machine interfaces.
77

88
[![Test Go status](https://github.com/arduino/arduino-cli/actions/workflows/test-go-task.yml/badge.svg)](https://github.com/arduino/arduino-cli/actions/workflows/test-go-task.yml)
9-
[![Test Integration status](https://github.com/arduino/arduino-cli/actions/workflows/test-go-integration-task.yml/badge.svg)](https://github.com/arduino/arduino-cli/actions/workflows/test-go-integration-task.yml)
109
[![Publish Nightly Build status](https://github.com/arduino/arduino-cli/actions/workflows/publish-go-nightly-task.yml/badge.svg)](https://github.com/arduino/arduino-cli/actions/workflows/publish-go-nightly-task.yml)
1110
[![Deploy Website status](https://github.com/arduino/arduino-cli/actions/workflows/deploy-cobra-mkdocs-versioned-poetry.yml/badge.svg)](https://github.com/arduino/arduino-cli/actions/workflows/deploy-cobra-mkdocs-versioned-poetry.yml)
1211
[![Codecov](https://codecov.io/gh/arduino/arduino-cli/branch/main/graph/badge.svg)](https://codecov.io/gh/arduino/arduino-cli)

Diff for: Taskfile.yml

+1-27
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,6 @@ tasks:
122122
{{default .DEFAULT_INTEGRATIONTEST_GO_PACKAGES .GO_PACKAGES}} \
123123
{{.TEST_LDFLAGS}}
124124
125-
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/test-go-integration-task/Taskfile.yml
126-
go:test-integration:
127-
desc: Run integration tests
128-
deps:
129-
- task: go:build
130-
- task: poetry:install-deps
131-
cmds:
132-
- poetry run pytest test
133-
134125
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-task/Taskfile.yml
135126
go:vet:
136127
desc: Check for errors in Go code
@@ -244,22 +235,6 @@ tasks:
244235
cmds:
245236
- clang-format -i rpc/cc/arduino/cli/*/*/*.proto
246237

247-
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-python-task/Taskfile.yml
248-
python:format:
249-
desc: Format Python files
250-
deps:
251-
- task: poetry:install-deps
252-
cmds:
253-
- poetry run black .
254-
255-
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-python-task/Taskfile.yml
256-
python:lint:
257-
desc: Lint Python code
258-
deps:
259-
- task: poetry:install-deps
260-
cmds:
261-
- poetry run flake8 --show-source
262-
263238
build:
264239
desc: Build the project
265240
deps:
@@ -269,7 +244,7 @@ tasks:
269244
desc: Run the full testsuite, `legacy` will be skipped
270245
cmds:
271246
- task: go:test
272-
- task: go:test-integration
247+
- task: go:integration-test
273248

274249
test-legacy:
275250
desc: Run tests for the `legacy` package
@@ -297,7 +272,6 @@ tasks:
297272
cmds:
298273
- task: go:vet
299274
- task: go:lint
300-
- task: python:lint
301275
- task: protoc:check
302276

303277
check-legacy:

Diff for: docs/CONTRIBUTING.md

+8-45
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ To build the Arduino CLI from sources you need the following tools to be availab
7676
If you want to run integration tests you will also need:
7777

7878
- A serial port with an Arduino board attached
79-
- A working [Python][3] environment, version 3.8 or later
8079

8180
If you're working on the gRPC interface you will also have to:
8281

@@ -115,7 +114,7 @@ task go:test
115114
To run integration tests (these will take some time and require special setup, see following paragraph):
116115

117116
```shell
118-
task go:test-integration
117+
task go:integration-test
119118
```
120119

121120
#### Running only some tests
@@ -163,65 +162,29 @@ the above requirements.
163162

164163
##### Software requirements for running integration tests:
165164

166-
A working Python environment. Chances are that you already have Python installed in your system, if this is not the case
167-
you can [download][3] the official distribution or use the package manager provided by your Operating System.
168-
169-
Some dependencies need to be installed before running the tests and to avoid polluting your global Python environment
170-
with dependencies that might be only used by the Arduino CLI, to do so we use [Poetry][poetry-website]. First you need
171-
to install it (you might need to `sudo` the following command):
172-
173-
```shell
174-
pip3 install --user poetry
175-
```
176-
177-
For more installation options read the [official documentation][poetry-docs].
165+
A working Go environment. Chances are that you already have Go installed in your system, if this is not the case you can
166+
[download][1] the official distribution or use the package manager provided by your Operating System.
178167

179168
#### Running tests
180169

181170
After the software requirements have been installed you should be able to run the tests with:
182171

183172
```shell
184-
task go:test-integration
173+
task go:integration-test
185174
```
186175

187-
This will automatically install the necessary dependencies, if not already installed, and run the integration tests
188-
automatically.
176+
This will run the integration tests automatically.
189177

190-
To run specific modules you must run `pytest` from the virtual environment created by Poetry.
178+
To run specific packages you must run `go test`.
191179

192180
```shell
193-
poetry run pytest test/test_lib.py
181+
go test -v github.com/arduino/arduino-cli/internal/integrationtest/lib
194182
```
195183

196184
To run very specific test functions:
197185

198186
```shell
199-
poetry run pytest test/test_lib.py::test_list
200-
```
201-
202-
You can avoid writing the `poetry run` prefix each time by creating a new shell inside the virtual environment:
203-
204-
```shell
205-
poetry shell
206-
pytest test_lib.py
207-
pytest test_lib.py::test_list
208-
```
209-
210-
#### Linting and formatting
211-
212-
When editing any Python file in the project remember to run linting checks with:
213-
214-
```shell
215-
task python:lint
216-
```
217-
218-
This will run `flake8` automatically and return any error in the code formatting, if not already installed it will also
219-
install integration tests dependencies.
220-
221-
In case of linting errors you should be able to solve most of them by automatically formatting with:
222-
223-
```shell
224-
task python:format
187+
go test -v github.com/arduino/arduino-cli/internal/integrationtest/lib -run TestLibUpgradeCommand
225188
```
226189

227190
### Dependency license metadata
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)