Skip to content

Commit

Permalink
Rebase + fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
lealobanov committed Jul 24, 2024
2 parents 090bb7d + 26f8692 commit fc5b9ae
Show file tree
Hide file tree
Showing 158 changed files with 2,121 additions and 876 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/ci-examples-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Build SDK Examples Pull Request
on: pull_request

jobs:
build:
name: Build pull request
runs-on: ubuntu-latest
env:
JAVA_OPTS: -Xmx2g -Dorg.gradle.daemon=false
#services:
# flow-emulator:
# image: gcr.io/flow-container-registry/emulator
# env:
# FLOW_VERBOSE: true
# FLOW_PORT: 3569
# FLOW_INTERVAL: 5s
# FLOW_PERSIST: false
# ports:
# - 3569:3569
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Java
uses: actions/setup-java@v2
with:
java-version: '21'
java-package: jdk
distribution: 'adopt'

- name: Install flow emulator
run: sh -ci "$(curl -fsSL https://storage.googleapis.com/flow-cli/install.sh)"

- name: Make gradle executable
run: chmod +x ./gradlew

- name: Build
id: build
run: ./gradlew --warning-mode all check build -x test -x integrationTest

- name: Start emulator
id: start_emulator
if: ${{ steps.build.outcome == 'success' }}
run: |
nohup flow emulator start -v --persist > flow-emulator.log 2>&1 &
- name: Wait for emulator to start
id: wait_for_emulator
if: ${{ steps.start_emulator.outcome == 'success' }}
run: sleep 15

- name: Run Java Example Unit Tests
id: unit_test
if: ${{ steps.wait_for_emulator.outcome == 'success' }}
run: ./gradlew --no-daemon --max-workers=2 --warning-mode=all :java-example:test -i --continue --stacktrace

- name: Run Kotlin Example Unit Tests
id: unit_test_2
if: ${{ steps.wait_for_emulator.outcome == 'success' }}
run: ./gradlew --no-daemon --max-workers=2 --warning-mode=all :kotlin-example:test -i --continue --stacktrace

- name: Publish SDK Examples Unit Test Results
uses: EnricoMi/[email protected]
if: always()
with:
check_name: "SDK Examples Unit Test Results"
files: "**/test-results/test/**/*.xml"
seconds_between_github_writes: 5
secondary_rate_limit_wait_seconds: 120
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: sh -ci "$(curl -fsSL https://storage.googleapis.com/flow-cli/install.sh)"

- name: Make gradle executable
run: chmod +x ./gradlew
run: chmod +x ./sdk/gradlew

- name: Build
id: build
Expand All @@ -60,4 +60,4 @@ jobs:
./gradlew \
-Psigning.key="${{ secrets.FLOW_JVM_SDK_SIGNING_KEY }}" \
-Psigning.password="${{ secrets.FLOW_JVM_SDK_SIGNING_PASSWORD }}" \
publishAndReleaseToMavenCentral --no-configuration-cache
:sdk:publishAndReleaseToMavenCentral --no-configuration-cache
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: sh -ci "$(curl -fsSL https://storage.googleapis.com/flow-cli/install.sh)"

- name: Make gradle executable
run: chmod +x ./gradlew
run: chmod +x ./sdk/gradlew

- name: Build
id: build
Expand All @@ -60,4 +60,4 @@ jobs:
./gradlew \
-Psigning.key="${{ secrets.FLOW_JVM_SDK_SIGNING_KEY }}" \
-Psigning.password="${{ secrets.FLOW_JVM_SDK_SIGNING_PASSWORD }}" \
publishToMavenCentral --no-configuration-cache
:sdk:publishToMavenCentral --no-configuration-cache
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: sh -ci "$(curl -fsSL https://storage.googleapis.com/flow-cli/install.sh)"

- name: Make gradle executable
run: chmod +x ./gradlew
run: chmod +x ./sdk/gradlew

- name: Build
id: build
Expand All @@ -48,7 +48,7 @@ jobs:
if: ${{ steps.build.outcome == 'success' }}
run: |
export PATH="$HOME/.local/bin:$PATH"
./gradlew --no-daemon --max-workers=2 --warning-mode=all test --continue --stacktrace
./gradlew --no-daemon --max-workers=2 --warning-mode=all :sdk:test --continue --stacktrace
- name: Publish Unit Test Results
uses: EnricoMi/[email protected]
Expand All @@ -63,7 +63,7 @@ jobs:
if: ${{ steps.unit_test.outcome == 'success' }}
run: |
export PATH="$HOME/.local/bin:$PATH"
./gradlew --no-daemon --max-workers=2 --warning-mode=all integrationTest --continue --stacktrace
./gradlew --no-daemon --max-workers=2 --warning-mode=all :sdk:integrationTest --continue --stacktrace
- name: Publish Integration Test Results
uses: EnricoMi/[email protected]
Expand All @@ -90,5 +90,5 @@ jobs:
./gradlew \
-Psigning.key="${{ secrets.FLOW_JVM_SDK_SIGNING_KEY }}" \
-Psigning.password="${{ secrets.FLOW_JVM_SDK_SIGNING_PASSWORD }}" \
publishAndReleaseToMavenCentral --no-configuration-cache
:sdk:publishAndReleaseToMavenCentral --no-configuration-cache
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: sh -ci "$(curl -fsSL https://storage.googleapis.com/flow-cli/install.sh)"

- name: Make gradle executable
run: chmod +x ./gradlew
run: chmod +x ./sdk/gradlew

- name: Build
id: build
Expand All @@ -49,7 +49,7 @@ jobs:
if: ${{ steps.build.outcome == 'success' }}
run: |
export PATH="$HOME/.local/bin:$PATH"
./gradlew --no-daemon --max-workers=2 --warning-mode=all test --continue --stacktrace
./gradlew --no-daemon --max-workers=2 --warning-mode=all :sdk:test --continue --stacktrace
- name: Publish Unit Test Results
uses: EnricoMi/[email protected]
Expand All @@ -64,7 +64,7 @@ jobs:
if: ${{ steps.unit_test.outcome == 'success' }}
run: |
export PATH="$HOME/.local/bin:$PATH"
./gradlew --no-daemon --max-workers=2 --warning-mode=all integrationTest --continue --stacktrace
./gradlew --no-daemon --max-workers=2 --warning-mode=all :sdk:integrationTest --continue --stacktrace
- name: Publish Integration Test Results
uses: EnricoMi/[email protected]
Expand All @@ -91,4 +91,4 @@ jobs:
./gradlew \
-Psigning.key="${{ secrets.FLOW_JVM_SDK_SIGNING_KEY }}" \
-Psigning.password="${{ secrets.FLOW_JVM_SDK_SIGNING_PASSWORD }}" \
publishToMavenCentral --no-configuration-cache
:sdk:publishToMavenCentral --no-configuration-cache
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Pull Request
name: Build SDK Pull Request
on: pull_request

jobs:
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
if: ${{ steps.build.outcome == 'success' }}
run: |
export PATH="$HOME/.local/bin:$PATH"
./gradlew --no-daemon --max-workers=2 --warning-mode=all test --continue --stacktrace
./gradlew --no-daemon --max-workers=2 --warning-mode=all :sdk:test --continue --stacktrace
- name: Publish Unit Test Results
uses: EnricoMi/[email protected]
Expand All @@ -58,7 +58,7 @@ jobs:
if: ${{ steps.unit_test.outcome == 'success' }}
run: |
export PATH="$HOME/.local/bin:$PATH"
./gradlew --no-daemon --max-workers=2 --warning-mode=all integrationTest --continue --stacktrace
./gradlew --no-daemon --max-workers=2 --warning-mode=all :sdk:integrationTest --continue --stacktrace
- name: Publish Integration Test Results
uses: EnricoMi/[email protected]
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build
.gradle
.idea
gradle.properties
sdk/gradle.properties
flowdb
4 changes: 0 additions & 4 deletions NOTICE

This file was deleted.

Loading

0 comments on commit fc5b9ae

Please sign in to comment.