Skip to content

Commit

Permalink
Merge branch 'master' into spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
kaibolay authored Nov 21, 2024
2 parents c92758f + 2aa80ca commit 132d9a5
Show file tree
Hide file tree
Showing 11 changed files with 99 additions and 101 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/macos_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
- uses: gradle/wrapper-validation-action@v3
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 15
- uses: actions/cache@v4
with:
Expand All @@ -35,10 +36,11 @@ jobs:
restore-keys: |
${{ runner.os }}-2-gradle-
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Gradle clean build
uses: gradle/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HEAD_REF: ${{ github.head_ref }}
with:
arguments: "clean build"
run: ./gradlew clean build
37 changes: 18 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,36 +59,35 @@ jobs:
echo "$GITHUB_SHA" > ./test_runner/src/main/resources/revision.txt
echo "$RELEASE_TAG" > ./test_runner/src/main/resources/version.txt
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Gradle Build Flank
uses: gradle/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HEAD_REF: ${{ github.head_ref }}
with:
arguments: "clean test_runner:build test_runner:shadowJar"
run: ./gradlew clean test_runner:build test_runner:shadowJar

- name: Delete old release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh --version
flankScripts github delete_release --git-tag=$RELEASE_TAG
- name: Delete old tag
if: ${{ env.RELEASE_TAG == 'flank-snapshot' }}
run: flankScripts github delete_old_tag --git-tag=$RELEASE_TAG --username=$GITHUB_ACTOR --token=${{ secrets.GITHUB_TOKEN }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: flankScripts github delete_old_tag --git-tag=$RELEASE_TAG --username=$GITHUB_ACTOR --token="$GH_TOKEN"

- name: Release snapshot
if: ${{ env.RELEASE_TAG == 'flank-snapshot' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: flankScripts github make_release --input-file=./test_runner/build/libs/flank.jar --git-tag=$RELEASE_TAG --commit-hash=$GITHUB_SHA --snapshot

- name: Release stable
if: startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: flankScripts github make_release --input-file=./test_runner/build/libs/flank.jar --git-tag=$RELEASE_TAG --token=${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: flankScripts github make_release --input-file=./test_runner/build/libs/flank.jar --git-tag=$RELEASE_TAG --token="$GH_TOKEN"

- name: Append checksum to release
env:
Expand All @@ -98,22 +97,22 @@ jobs:
gh release upload $RELEASE_TAG flank.sha256
- name: Gradle Upload to MavenCentral
uses: gradle/[email protected]
env:
PGP_SIGNING_KEY: ${{ secrets.PGP_SIGNING_KEY }}
with:
arguments: :test_runner:publishMavenJavaPublicationToMavenCentralRepository -PMVN_CENTRAL_USER=${{ secrets.MVN_CENTRAL_USER }} -PMVN_CENTRAL_PASSWORD=${{ secrets.MVN_CENTRAL_PASSWORD }}
MVN_CENTRAL_USER: ${{ secrets.MVN_CENTRAL_USER }}
PMVN_CENTRAL_PASSWORD: ${{ secrets.MVN_CENTRAL_PASSWORD }}
run: ./gradlew :test_runner:publishMavenJavaPublicationToMavenCentralRepository -PMVN_CENTRAL_USER="$MVN_CENTRAL_USER" -PMVN_CENTRAL_PASSWORD="$MVN_CENTRAL_PASSWORD"

- name: Gradle close staging on MavenCentral
uses: gradle/[email protected]
if: startsWith(github.ref, 'refs/tags/v')
with:
arguments: closeAndReleaseRepository -PMVN_CENTRAL_USER=${{ secrets.MVN_CENTRAL_USER }} -PMVN_CENTRAL_PASSWORD=${{ secrets.MVN_CENTRAL_PASSWORD }}
env:
MVN_CENTRAL_USER: ${{ secrets.MVN_CENTRAL_USER }}
MVN_CENTRAL_PASSWORD: ${{ secrets.MVN_CENTRAL_PASSWORD }}
run: ./gradlew closeAndReleaseRepository -PMVN_CENTRAL_USER="$MVN_CENTRAL_USER" -PMVN_CENTRAL_PASSWORD="$MVN_CENTRAL_PASSWORD"

- name: Gradle Upload to GitHub packages
uses: gradle/[email protected]
if: startsWith(github.ref, 'refs/tags/v')
env:
PGP_SIGNING_KEY: ${{ secrets.PGP_SIGNING_KEY }}
with:
arguments: ":test_runner:publishMavenJavaPublicationToGitHubPackagesRepository -PGITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}"
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew :test_runner:publishMavenJavaPublicationToGitHubPackagesRepository -PGITHUB_TOKEN="$GH_TOKEN"
9 changes: 5 additions & 4 deletions .github/workflows/release_flank_scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ jobs:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v3

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Gradle Upload to GitHub packages and GitHub release
uses: gradle/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
arguments: "flank-scripts:releaseFlankScripts -PGITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}"
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew flank-scripts:releaseFlankScripts -PGITHUB_TOKEN="$GH_TOKEN"
9 changes: 5 additions & 4 deletions .github/workflows/release_flank_wrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ jobs:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v3

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Gradle Upload to GitHub packages and GitHub release
uses: gradle/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
arguments: "flank_wrapper:releaseFlankWrapper -PGITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}"
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew flank-wrapper:releaseFlankWrapper -PGITHUB_TOKEN="$GH_TOKEN"
11 changes: 7 additions & 4 deletions .github/workflows/run_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,15 @@ jobs:
fi
shell: bash

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Gradle integration tests
uses: gradle/[email protected]
id: run-it
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HEAD_REF: ${{ github.ref }}
with:
arguments: "integrationTests"
run: ./gradlew integrationTests

- name: Export Variables for FlankScripts
if: ${{ always() }}
Expand Down Expand Up @@ -117,11 +118,13 @@ jobs:
echo "./flank-scripts/bash" >> $GITHUB_PATH
- name: Process IT results
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
flankScripts integration_tests process_results \
--global-result=${{ needs.run-it-full-suite.outputs.job_status }} \
--run-result='${{ toJSON(env) }}' \
--github-token=${{ secrets.GITHUB_TOKEN }} \
--github-token="$GH_TOKEN" \
--run-id=${{ github.run_id }}
trigger-pointer:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tag_next_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ jobs:
./gradlew :flank-scripts:download
echo "./flank-scripts/bash" >> $GITHUB_PATH
- name: Set next release tag variable
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG=$(flankScripts release next_tag --token=${{ secrets.GITHUB_TOKEN }})
TAG=$(flankScripts release next_tag --token="$GH_TOKEN")
echo "NEXT_RELEASE_TAG=$(echo $TAG)" >> $GITHUB_ENV
- name: Push tag
Expand Down
48 changes: 14 additions & 34 deletions .github/workflows/ubuntu_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,19 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- id: build
name: Gradle clean build
uses: gradle/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HEAD_REF: ${{ github.head_ref }}
with:
arguments: "clean build"

run: ./gradlew clean build

publish-scan-url:
needs: [ build ]
needs:
- build
permissions:
pull-requests: write # to allow creating or updating a comment
if: ${{ github.event_name == 'pull_request' }}
Expand All @@ -67,34 +69,12 @@ jobs:
uses: 1466587594/get-current-time@v2
id: current-time
with:
format: 'YYYY-MM-DD HH:mm:ss'
format: "YYYY-MM-DD HH:mm:ss"
utcOffset: "+00:00"

- name: Find Comment
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Buildscan url for ubuntu-workflow run

- name: Create comment
if: ${{ steps.fc.outputs.comment-id == 0 }}
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
**Timestamp:** ${{ steps.current-time.outputs.formattedTime }}
**Buildscan url for ubuntu-workflow run [${{ github.run_id }}](https://github.com/Flank/flank/actions/runs/${{ github.run_id }})**
${{ needs.build.outputs.build-scan-url }}
- name: Update comment
if: ${{ steps.fc.outputs.comment-id != 0 }}
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
edit-mode: replace
body: |
**Timestamp:** ${{ steps.current-time.outputs.formattedTime }}
**Buildscan url for ubuntu-workflow run [${{ github.run_id }}](https://github.com/Flank/flank/actions/runs/${{ github.run_id }})**
${{ needs.build.outputs.build-scan-url }}
- name: Write Buildscan URL to Summary
run: |
echo "**Timestamp:** ${{ steps.current-time.outputs.formattedTime }}" >> $GITHUB_STEP_SUMMARY
echo "**Buildscan URL for ubuntu-workflow run:**" >> $GITHUB_STEP_SUMMARY
echo "[${{ github.run_id }}](https://github.com/Flank/flank/actions/runs/${{ github.run_id }})" >> $GITHUB_STEP_SUMMARY
echo "${{ needs.build.outputs.build-scan-url }}" >> $GITHUB_STEP_SUMMARY
11 changes: 7 additions & 4 deletions .github/workflows/update_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ jobs:
app_id: ${{ secrets.FLANK_RELEASE_APP_ID }}
private_key: ${{ secrets.FLANK_RELEASE_PRIVATE_KEY }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Gradle dependency updates raport
uses: gradle/[email protected]
with:
arguments: dependencyUpdates -DoutputFormatter=json -DoutputDir=.
run: ./gradlew dependencyUpdates -DoutputFormatter=json -DoutputDir=.

- name: Download flankScripts and add it to PATH
env:
Expand Down Expand Up @@ -117,9 +118,11 @@ jobs:
echo "./flank-scripts/bash" >> $GITHUB_PATH
- name: Run SDK check
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
flankScripts firebase check_for_sdk_updates \
--github-token=${{ secrets.GITHUB_TOKEN }} \
--github-token="$GH_TOKEN" \
trigger-pointer:
runs-on: ubuntu-latest
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/windows_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ jobs:
restore-keys: |
${{ runner.os }}-2-gradle-
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Gradle clean build
uses: gradle/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HEAD_REF: ${{ github.head_ref }}
with:
arguments: "clean build"
run: ./gradlew clean build
13 changes: 7 additions & 6 deletions .github/workflows/wsl_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,18 @@ jobs:
GCLOUD_DIR="$HOME/.config/gcloud/"
mkdir -p "$GCLOUD_DIR"
echo "$GCLOUD_KEY" | base64 --ignore-garbage --decode > "$GCLOUD_DIR/application_default_credentials.json"
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Gradle Integration Tests Android
uses: gradle/[email protected]
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
with:
arguments: "--info :integration_tests:test --tests IntegrationTests.shouldMatchAndroidSuccessExitCodeAndPattern -Dflank-path=../test_runner/build/libs/flank.jar -Dyml-path=./src/test/resources/flank_android.yml"
run: |
./gradlew --info :integration_tests:test --tests IntegrationTests.shouldMatchAndroidSuccessExitCodeAndPattern -Dflank-path=../test_runner/build/libs/flank.jar -Dyml-path=./src/test/resources/flank_android.yml
- name: Gradle Integration Tests iOS
uses: gradle/[email protected]
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
with:
arguments: "--info :integration_tests:test --tests IntegrationTests.shouldMatchIosSuccessExitCodeAndPattern -Dflank-path=../test_runner/build/libs/flank.jar -Dyml-path=./src/test/resources/flank_ios.yml"
run: |
./gradlew --info :integration_tests:test --tests IntegrationTests.shouldMatchIosSuccessExitCodeAndPattern -Dflank-path=../test_runner/build/libs/flank.jar -Dyml-path=./src/test/resources/flank_ios.yml
43 changes: 24 additions & 19 deletions docs/feature/summary_output.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Formatted summary output
# Formatted summary output
```
┌─────────┬──────────────────────┬──────────────────────────┬─────────────────────────────────────────┐
│ OUTCOME │ MATRIX ID │ TEST AXIS VALUE │ TEST DETAILS │
Expand All @@ -16,24 +16,29 @@ As a user I want to see finely formatted summary result at the end of execution
Gcloud prints summary output in the table. It looks nice and is readable. Why we wouldn't have same in flank?

## Possible outputs
Numbers are representing `OUTCOME` column, points are representing `TEST DETAILS` column.
1. `success | flaky`
* `${1} test cases passed | ${2} skipped | ${3} flakes | (Native crash) | ---`
2. `failure`
* `${1} test cases failed | ${2} errors | ${3} passed | ${4} skipped | ${4} flakes | (Native crash)`
* `Application crashed | (Native crash)`
* `Test timed out | (Native crash)`
* `App failed to install | (Native crash)`
* `Unknown failure | (Native crash)`
3. `inconclusive`
* `Infrastructure failure`
* `Test run aborted by user`
* `Unknown reason`
4. `skipped`
* `Incompatible device/OS combination`
* `App does not support the device architecture`
* `App does not support the OS version`
* `Unknown reason`
Numbers represent the `OUTCOME` column, and bullet points represent the `TEST DETAILS` column.

1. success | flaky
- `${1} test cases passed | ${2} skipped | ${3} flakes | (Native crash) | ---`

2. failure
- `${1} test cases failed | ${2} errors | ${3} passed | ${4} skipped | ${4} flakes | (Native crash)`
- `Application crashed | (Native crash)`
- `Test timed out | (Native crash)`
- `App failed to install | (Native crash)`
- `Unknown failure | (Native crash)`

3. inconclusive
- `Infrastructure failure`
- `Test run aborted by user`
- `Unknown reason`

4. skipped
- `Incompatible device/OS combination`
- `App does not support the device architecture`
- `App does not support the OS version`
- `Unknown reason`


## Implementation details

Expand Down

0 comments on commit 132d9a5

Please sign in to comment.