-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add ui tests, revert changelog and add more docs
- Loading branch information
Showing
37 changed files
with
1,050 additions
and
53 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
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 |
---|---|---|
|
@@ -124,12 +124,12 @@ jobs: | |
report_paths: '**/build/test-results/test/TEST-*.xml' | ||
- name: Generate Coverage Report | ||
run: | | ||
./gradlew --quiet --console=plain "jacocoTestReport" | ||
./gradlew --quiet --console=plain "jacocoTestReport" -x "packages:jetbrains-plugin:uiTest" | ||
- uses: actions/upload-artifact@v4 | ||
name: Upload Unit Test Coverage | ||
with: | ||
name: unit-test-coverage | ||
path: "**/build/reports/jacoco/test/jacocoTestReport.xml" | ||
path: "**/jacocoTestReport.xml" | ||
|
||
functional-tests: | ||
name: 'Functional & UI Tests' | ||
|
@@ -144,12 +144,45 @@ jobs: | |
- name: Setup JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'adopt' | ||
distribution: 'zulu' | ||
java-version: '17' | ||
cache: 'gradle' | ||
- name: Functional Tests | ||
- name: Integration Tests | ||
run: | | ||
./gradlew --quiet --console=plain "clean" ":packages:jetbrains-plugin:cleanTest" ":packages:jetbrains-plugin:test" | ||
- name: Prepare License Key | ||
env: | ||
JB_TEST_KEY: ${{ secrets.JB_TEST_KEY }} | ||
run: | | ||
mkdir -p packages/jetbrains-plugin/build/idea-sandbox/config-uiTest | ||
echo "$JB_TEST_KEY" | base64 -d > packages/jetbrains-plugin/build/idea-sandbox/config-uiTest/idea.key | ||
- name: Start UI Test Environment | ||
run: | | ||
export DISPLAY=:99.0 | ||
Xvfb -ac :99 -screen 0 1920x1080x24 & | ||
sleep 10 | ||
mkdir -p packages/jetbrains-plugin/build/reports | ||
./gradlew :packages:jetbrains-plugin:runIdeForUiTests > packages/jetbrains-plugin/build/reports/idea.log & | ||
- name: Wait for IDE to start | ||
uses: jtalk/url-health-check-action@v3 | ||
with: | ||
url: "http://127.0.0.1:8082" | ||
max-attempts: 15 | ||
retry-delay: 30s | ||
- name: Run UI Tests | ||
run: | | ||
export DISPLAY=:99.0 | ||
./gradlew --quiet --console=plain :packages:jetbrains-plugin:uiTest | ||
- uses: actions/upload-artifact@v4 | ||
name: Upload UI Test Failures | ||
if: success() || failure() # always run even if the previous step fails | ||
with: | ||
name: ui-test-failures | ||
path: | | ||
**/build/reports/**/*.html | ||
**/build/reports/**/*.log | ||
**/build/reports/*/*.png | ||
**/video/**/*.avi | ||
- name: Publish Test Report | ||
uses: mikepenz/action-junit-report@v4 | ||
if: success() || failure() # always run even if the previous step fails | ||
|
@@ -162,7 +195,7 @@ jobs: | |
name: Upload Functional Test Coverage | ||
with: | ||
name: functional-test-coverage | ||
path: "**/build/reports/jacoco/test/jacocoTestReport.xml" | ||
path: "**/jacocoTestReport.xml" | ||
|
||
test-coverage: | ||
name: 'Test Coverage' | ||
|
@@ -184,16 +217,15 @@ jobs: | |
merge-multiple: true | ||
- uses: madrapps/[email protected] | ||
with: | ||
paths: "**/build/reports/jacoco/test/jacocoTestReport.xml" | ||
paths: "**/jacocoTestReport.xml" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
min-coverage-overall: 70 | ||
min-coverage-changed-files: 85 | ||
min-coverage-changed-files: 70 | ||
title: "Coverage Report" | ||
update-comment: true | ||
continue-on-error: true | ||
pass-emoji: "✅" | ||
fail-emoji: "🚫" | ||
debug-mode: true | ||
|
||
fitness-check: | ||
name: "Fitness Check" | ||
|
@@ -218,7 +250,8 @@ jobs: | |
jmh-output-path: build/reports/jmh/results.json | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
fail-on-regression: true | ||
failure-threshold: -5 | ||
# the typo is on purpose, it's like this in the plugin | ||
failue-threshold: -5 | ||
|
||
verify-plugin: | ||
name: "Verify Plugin" | ||
|
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 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 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 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 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 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 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 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
|
||
./gradlew --quiet --console=plain :packages:jetbrains-plugin:runIdeForUiTests > idea.log & | ||
IDEA_PID=$! | ||
|
||
waitForUrl() { | ||
echo "Testing $1" | ||
timeout -s TERM 90 bash -c \ | ||
'while [[ "$(curl -s -o /dev/null -L -w ''%{http_code}'' ${0})" != "200" ]];\ | ||
do echo "Waiting for ${0}" && sleep 2;\ | ||
done' $1 | ||
echo "OK!" | ||
} | ||
|
||
waitForUrl "http://localhost:8082" | ||
|
||
./gradlew --quiet --console=plain :packages:jetbrains-plugin:cleanTest :packages:jetbrains-plugin:uiTest | ||
|
||
RESULT=$? | ||
|
||
mv idea.log packages/jetbrains-plugin/build/reports/idea.log | ||
kill $IDEA_PID | ||
exit $RESULT |
Oops, something went wrong.