Skip to content

Commit b1579ee

Browse files
Maurizio Brancaumbynos
Maurizio Branca
andcommitted
[EDITOR-527] E2E testing infrastructure (#591)
* Bootstrap E2E testing infrastructure * add e2e tests in taskfile and in CI * fix deprecation warning when running pytest * Run e2e tests only with GUI version on macos (Github runners are basically mac mini with GUI support)" * add first draft of tests for certs and v2 APIs * add logs to .gitignore * skip update, currently no way of testing this on gh runners Co-authored-by: umbynos <[email protected]>
1 parent 88e424a commit b1579ee

11 files changed

+457
-0
lines changed

Diff for: .github/workflows/release.yml

+13
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,19 @@ jobs:
123123
run: task build
124124
if: matrix.os == 'macos-10.15'
125125

126+
- name: Install Python
127+
uses: actions/setup-python@v2
128+
with:
129+
python-version: '3.9'
130+
architecture: 'x64'
131+
if: matrix.os == 'macos-10.15'
132+
133+
- name: Run e2e tests
134+
run: |
135+
pip install poetry
136+
task test-e2e
137+
if: matrix.os == 'macos-10.15'
138+
126139
# this will create `public/` dir with compressed full bin (<version>/<os>-<arch>.gz) and a json file
127140
- name: Create autoupdate files
128141
run: go-selfupdate arduino-create-agent${{ matrix.ext }} ${TAG_VERSION}

Diff for: .github/workflows/test.yml

+13
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,19 @@ jobs:
9191
run: task build
9292
if: matrix.os == 'macos-10.15'
9393

94+
- name: Install Python
95+
uses: actions/setup-python@v2
96+
with:
97+
python-version: '3.9'
98+
architecture: 'x64'
99+
if: matrix.os == 'macos-10.15'
100+
101+
- name: Run e2e tests
102+
run: |
103+
pip install poetry
104+
task test-e2e
105+
if: matrix.os == 'macos-10.15'
106+
94107
# config.ini is required by the executable when it's run
95108
- name: Upload artifacts
96109
uses: actions/upload-artifact@v2

Diff for: .gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@ rsrc.syso
77
snapshot/*
88
public/
99
artifacts*
10+
logs/
1011

1112
# IDEs config
1213
.idea
14+
.vscode
1315

1416
# macOS
1517
.DS_Store
18+
19+
# Python
20+
__pycache__

Diff for: Taskfile.yml

+6
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ tasks:
3333
cmds:
3434
- go test -short -run '{{ default ".*" .TEST_REGEX }}' {{ default "-v" .GOFLAGS }} -coverprofile=coverage_unit.txt {{ default .DEFAULT_TARGETS .TARGETS }} {{.TEST_LDFLAGS}}
3535

36+
test-e2e:
37+
desc: Run end 2 end tests
38+
cmds:
39+
- poetry install --no-root
40+
- poetry run pytest test
41+
3642
check:
3743
desc: Check fmt and lint
3844
cmds:

Diff for: poetry.lock

+280
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: pyproject.toml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[tool.poetry]
2+
name = "arduino-create-agent"
3+
version = "0.1.0"
4+
description = "Project used to run end-to-end test for the Arduino Create Agent"
5+
authors = ["Umberto Baldi <[email protected]>", "Maurizio Branca <[email protected]>"]
6+
license = "GPLv2"
7+
8+
[tool.poetry.dependencies]
9+
python = "^3.9"
10+
psutil = "^5.8.0"
11+
12+
[tool.poetry.dev-dependencies]
13+
pytest = "^6.2.1"
14+
requests = "^2.25.1"
15+
invoke = "^1.5.0"
16+
17+
[build-system]
18+
requires = ["poetry-core>=1.0.0"]
19+
build-backend = "poetry.core.masonry.api"
20+
21+
[tool.pytest.ini_options]
22+
filterwarnings = [
23+
"ignore::DeprecationWarning:invoke.loader" # https://github.com/pyinvoke/invoke/issues/675
24+
]

0 commit comments

Comments
 (0)