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

[EDITOR-527] E2E testing infrastructure #591

Merged
merged 13 commits into from
Feb 3, 2021
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/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,19 @@ jobs:
run: task build
if: matrix.os == 'macos-10.15'

- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'
if: matrix.os == 'macos-10.15'

- name: Run e2e tests
run: |
pip install poetry
task test-e2e
if: matrix.os == 'macos-10.15'

# this will create `public/` dir with compressed full bin (<version>/<os>-<arch>.gz) and a json file
- name: Create autoupdate files
run: go-selfupdate arduino-create-agent${{ matrix.ext }} ${TAG_VERSION}
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,19 @@ jobs:
run: task build
if: matrix.os == 'macos-10.15'

- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'
if: matrix.os == 'macos-10.15'

- name: Run e2e tests
run: |
pip install poetry
task test-e2e
if: matrix.os == 'macos-10.15'

# config.ini is required by the executable when it's run
- name: Upload artifacts
uses: actions/upload-artifact@v2
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ rsrc.syso
snapshot/*
public/
artifacts*
logs/

# IDEs config
.idea
.vscode

# macOS
.DS_Store

# Python
__pycache__
6 changes: 6 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ tasks:
cmds:
- go test -short -run '{{ default ".*" .TEST_REGEX }}' {{ default "-v" .GOFLAGS }} -coverprofile=coverage_unit.txt {{ default .DEFAULT_TARGETS .TARGETS }} {{.TEST_LDFLAGS}}

test-e2e:
desc: Run end 2 end tests
cmds:
- poetry install --no-root
- poetry run pytest test

check:
desc: Check fmt and lint
cmds:
Expand Down
280 changes: 280 additions & 0 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[tool.poetry]
name = "arduino-create-agent"
version = "0.1.0"
description = "Project used to run end-to-end test for the Arduino Create Agent"
authors = ["Umberto Baldi <[email protected]>", "Maurizio Branca <[email protected]>"]
license = "GPLv2"

[tool.poetry.dependencies]
python = "^3.9"
psutil = "^5.8.0"

[tool.poetry.dev-dependencies]
pytest = "^6.2.1"
requests = "^2.25.1"
invoke = "^1.5.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.pytest.ini_options]
filterwarnings = [
"ignore::DeprecationWarning:invoke.loader" # https://github.com/pyinvoke/invoke/issues/675
]
Loading