You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although all SDK's must pass a mostly identical set of cucumber features, there are still many differences that can make it difficult for Algorand developers needing to work across more than one SDK.
Solution
Implement the following guidelines for circle config tasks as well as Makefile naming conventions:
Circle .config guidelines:
Job that runs make docker-test should be called docker-test
Whenever possible, circle jobs should call directly into Makefile
Whenever possible, circle job names should be the same as their finalMakefile target. EG: Javascript's compile_test job might be renamed compile-test and call a new target compile-test.
Makefile naming conventions:
keep the current "common _universal_targets" (see below)
keep the current "SDK varying targets" (see below).
reserve the following special targets to have the following meanings:
XYZ-unit - unit tests not defined by cucumber features and which avoid all such features without warning messages
XYZ-integration - similar to the previous but for non-cucumber integration tests
aim to unify the naming of other common tasks such as:
lint - a task that encompasses all linters and format checks
generate-docs
Dependencies
None
Urgency
Low / Medium - this is more of a nuisance than a huge problem. However, in anticipation for #228, it will be quite useful to take the actions items above, as transitioning to github actions will be much more consistent across SDK's and therefore easier to achieve.
Research Findings
Following recent changes (#220) SDK Makefile's have the following targets:
common universal targets
unit & integration - for running cucumber tests
harness - for bootstrapping the Sandbox based test harness
docker-test - for running all cucumber tests in a docker container using the harness sandbox
SDK varying targets
docker-XYZsdk-build and docker-XYZsdk-run - for building and running the sdk's docker container
display-all-XYZ-steps - for scraping all implemented cucumber steps
there are special targets as well that only exist in a particular SDK such as:
format in the Javascript SDK
lint, generate, build, fmt, ... in the Go SDK
Currently, the Circle CI configs don't consistently call their repo's Makefiles. In particular:
Java: has a unit-test job that runs mvn test inside of an adoptopenjdk/maven-openjdk11 docker
Python: has a unit-test job that runs pytest tests/unit_tests as well as a docset job that generates docs
Javascript: has the most complex circle config:
job ESLint runs npm run list
job prettier runs npx prettier --check .
job compile_test runs npx prettier --check .
job generate_docs
The only exception is that all consistently call make docker-test through a circle job either called integration-test or build_and_test or test.
tzaffi
changed the title
Unify approach for cucumber and non-cucumber tests across SDK's in CI
Unify approach for cucumber and non-cucumber jobs across SDK's in CI
Aug 26, 2022
Problem - Disparate approach to Testing and CI
Although all SDK's must pass a mostly identical set of cucumber features, there are still many differences that can make it difficult for Algorand developers needing to work across more than one SDK.
Solution
Implement the following guidelines for circle config tasks as well as
Makefile
naming conventions:.config
guidelines:make docker-test
should be calleddocker-test
Makefile
Makefile
target. EG: Javascript'scompile_test
job might be renamedcompile-test
and call a new targetcompile-test
.Makefile
naming conventions:XYZ-unit
- unit tests not defined by cucumber features and which avoid all such features without warning messagesXYZ-integration
- similar to the previous but for non-cucumber integration testslint
- a task that encompasses all linters and format checksgenerate-docs
Dependencies
None
Urgency
Low / Medium - this is more of a nuisance than a huge problem. However, in anticipation for #228, it will be quite useful to take the actions items above, as transitioning to github actions will be much more consistent across SDK's and therefore easier to achieve.
Research Findings
Following recent changes (#220) SDK
Makefile
's have the following targets:unit
&integration
- for running cucumber testsharness
- for bootstrapping the Sandbox based test harnessdocker-test
- for running all cucumber tests in a docker container using the harness sandboxdocker-XYZsdk-build
anddocker-XYZsdk-run
- for building and running the sdk's docker containerdisplay-all-XYZ-steps
- for scraping all implemented cucumber stepsformat
in the Javascript SDKlint
,generate
,build
,fmt
, ... in the Go SDKCurrently, the Circle CI configs don't consistently call their repo's Makefiles. In particular:
unit-test
job that runsmvn test
inside of anadoptopenjdk/maven-openjdk11
dockerunit-test
job that runspytest tests/unit_tests
as well as adocset
job that generates docsESLint
runsnpm run list
prettier
runsnpx prettier --check .
compile_test
runsnpx prettier --check .
generate_docs
The only exception is that all consistently call
make docker-test
through a circle job either calledintegration-test
orbuild_and_test
ortest
.Links
The text was updated successfully, but these errors were encountered: