-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ANCHOR-459] Split SEP Tests of AnchorPlatformIntegrationTest (#1185)
### Description - Split SEP Tests of AnchorPlatformIntegrationTest - Replace `SepClient` classes with wallet sdk for some of the SEP tests. - Disable the tests that requires non-`default` test configuration. - Enable integration test concurrency. - Add Mutex to reference server transaction submission function. ### Context - Test improvements. ### Testing - `./gradlew test` ### Known Limitaions - Tests with non-`default` configurations will be moved to `extended-tests` subproject.
- Loading branch information
Showing
54 changed files
with
1,215 additions
and
1,682 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ on: | |
|
||
jobs: | ||
gradle_test_and_build: | ||
name: Gradle Test and Build | ||
name: Gradle Build, Tests and Code Coverage | ||
runs-on: ubuntu-latest-16-cores | ||
# write to PR permission is required for jacocoTestReport Action to update comment | ||
permissions: | ||
|
@@ -31,7 +31,7 @@ jobs: | |
sudo echo "127.0.0.1 custody-server" | sudo tee -a /etc/hosts | ||
sudo echo "127.0.0.1 host.docker.internal" | sudo tee -a /etc/hosts | ||
- name: Build and run the stack with docker compose | ||
- name: Run Zookeeper, Kafka, Postgres, and Sep24 UI with docker compose | ||
env: | ||
TEST_PROFILE_NAME: default | ||
run: docker-compose -f service-runner/src/main/resources/docker-compose-test.yaml up -d --build | ||
|
@@ -53,44 +53,21 @@ jobs: | |
|
||
# Gradle test is now printing the test messages to GitHub Actions log. | ||
# It is not necessary to print the reports. | ||
- name: Gradle test and build. (unit tests, integration tests, end-2-end tests and build) | ||
- name: Gradle Build. (unit tests only) | ||
env: | ||
run_docker: false | ||
run: ./gradlew clean build jacocoTestReport --no-daemon --stacktrace -x spotlessApply -x spotlessKotlinApply -x javadoc -x javadocJar -x sourcesJar | ||
run: ./gradlew clean build jacocoTestReport -x integration-tests:test --no-daemon --stacktrace -x spotlessApply -x spotlessKotlinApply -x javadoc -x javadocJar -x sourcesJar | ||
|
||
- name: Add coverage to PR | ||
id: jacoco | ||
uses: madrapps/[email protected] | ||
with: | ||
paths: ${{ github.workspace }}/**/build/reports/jacoco/test/jacocoTestReport.xml | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
min-coverage-overall: 40 | ||
min-coverage-changed-files: 60 | ||
title: Code Coverage | ||
update-comment: true | ||
|
||
- name: Stop docker containers | ||
env: | ||
TEST_PROFILE_NAME: default | ||
run: docker-compose -f service-runner/src/main/resources/docker-compose-test.yaml down | ||
|
||
- name: Start docker containers | ||
env: | ||
TEST_PROFILE_NAME: default | ||
run: docker-compose -f service-runner/src/main/resources/docker-compose-test.yaml up -d | ||
|
||
- name: Run sep server, observer, java reference server and kotlin reference server | ||
- name: Run sep server, platform server, observer, and reference servers for integration tests | ||
env: | ||
run_docker: false | ||
run_all_servers: false | ||
run_sep_server: true | ||
run_platform_server: true | ||
run_observer: true | ||
run_kotlin_reference_server: true | ||
# Running wallet server is not required for sep tests. However, running wallet server | ||
# and kotlin reference server at the same time causes `ktor` to block the JVM. | ||
# If we need to run both `ktor` servers, we will need to run them in separate JVMs. | ||
run_wallet_server: false | ||
run_event_processing_server: true | ||
run_wallet_server: true | ||
|
||
SEP1_TOML_VALUE: service-runner/src/main/resources/config/stellar.host.docker.internal.toml | ||
SEP10_HOME_DOMAIN: host.docker.internal:8080 | ||
|
@@ -99,18 +76,37 @@ jobs: | |
cp service-runner/build/libs/anchor-platform-runner-*.jar service-runner/build/libs/anchor-platform-runner.jar | ||
java -jar service-runner/build/libs/anchor-platform-runner.jar -t & | ||
- name: Wait for sep server to start and get ready | ||
- name: Wait for the sep server to start and get ready | ||
uses: mydea/action-wait-for-api@v1 | ||
with: | ||
url: "http://localhost:8080/.well-known/stellar.toml" | ||
expected-status: "200" | ||
timeout: "300" | ||
interval: "1" | ||
|
||
- name: Run the integration tests and end-2-end tests | ||
env: | ||
run_docker: false | ||
ANCHOR_DOMAIN: http://host.docker.internal:8080 | ||
|
||
run: ./gradlew integration-tests:test | ||
|
||
- name: Run Stellar validation tool | ||
run: | | ||
docker run --network host -v ${GITHUB_WORKSPACE}/platform/src/test/resources://config stellar/anchor-tests:v0.6.9 --home-domain http://host.docker.internal:8080 --seps 1 6 10 12 24 31 38 --sep-config //config/stellar-anchor-tests-sep-config.json --verbose | ||
- name: Add coverage to PR | ||
id: jacoco | ||
uses: madrapps/[email protected] | ||
with: | ||
paths: ${{ github.workspace }}/**/build/reports/jacoco/test/jacocoTestReport.xml | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
min-coverage-overall: 40 | ||
min-coverage-changed-files: 60 | ||
title: Code Coverage | ||
update-comment: true | ||
|
||
- name: Upload Artifacts | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
|
@@ -134,7 +130,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'java', 'python' ] | ||
language: [ 'java-kotlin' ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.