Skip to content

Commented out failing test, oops #12

Commented out failing test, oops

Commented out failing test, oops #12

name: Build And Publish Snapshot
on:
push:
branches:
- main
jobs:
build:
name: Build and publish snapshot
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: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d%H%M%S')"
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: '21'
java-package: jdk
- 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
run: ./gradlew --warning-mode all check build -x test
- name: Test
run: |
export PATH="$HOME/.local/bin:$PATH"
./gradlew --no-daemon --max-workers=2 --warning-mode=all test --continue --stacktrace
if: "!contains(github.event.head_commit.message, '[i am bad and i hate unit tests]')"
- name: Publish Unit Test Results
uses: EnricoMi/[email protected]
if: always()
with:
files: "**/test-results/**/*.xml"
- name: Publish snapshot
run: |
if [[ "${{ secrets.FLOW_JVM_SDK_CICD_PUBLISH_ENABLED }}" != "true" ]];
then
exit 0;
fi
./gradlew \
-PsnapshotDate="${{ steps.date.outputs.date }}" \
-PgroupId="${{ secrets.FLOW_JVM_SDK_GROUP_ID }}" \
-Psigning.key="${{ secrets.FLOW_JVM_SDK_SIGNING_KEY }}" \
-Psigning.password="${{ secrets.FLOW_JVM_SDK_SIGNING_PASSWORD }}" \
-Psonatype.nexusUrl="${{ secrets.FLOW_JVM_SDK_NEXUS_URL }}" \
-Psonatype.snapshotRepositoryUrl="${{ secrets.FLOW_JVM_SDK_SNAPSHOT_REPOSITORY_URL }}" \
-Psonatype.username="${{ secrets.FLOW_JVM_SDK_SONATYPE_USERNAME }}" \
-Psonatype.password="${{ secrets.FLOW_JVM_SDK_SONATYPE_PASSWORD }}" \
-x test \
clean \
publishToSonatype \
closeAndReleaseSonatypeStagingRepository