remove deprecated shardingsphere based sharding solution and examples #23
Workflow file for this run
This file contains hidden or 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
| name: Persistence Common CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'persistence-common/**' | |
| - '.github/workflows/persistence-common-ci.yml' | |
| pull_request: | |
| branches: | |
| - '*' | |
| paths: | |
| - 'persistence-common/**' | |
| - '.github/workflows/persistence-common-ci.yml' | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: Test Persistence Common | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Cache Maven dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2 | |
| - name: Compile code | |
| working-directory: ./persistence-common | |
| run: mvn clean compile | |
| - name: Run unit tests | |
| working-directory: ./persistence-common | |
| run: mvn test | |
| - name: Package application | |
| working-directory: ./persistence-common | |
| run: mvn package -DskipTests | |
| - name: Run integration tests with Testcontainers | |
| working-directory: ./persistence-common | |
| run: mvn failsafe:integration-test | |
| env: | |
| # Testcontainers configuration | |
| TESTCONTAINERS_RYUK_DISABLED: false | |
| TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE: /var/run/docker.sock | |
| - name: Verify integration tests | |
| working-directory: ./persistence-common | |
| run: mvn failsafe:verify | |
| - name: Upload unit test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: unit-test-results-common | |
| path: persistence-common/target/surefire-reports/ | |
| retention-days: 30 | |
| - name: Upload integration test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: integration-test-results-common | |
| path: persistence-common/target/failsafe-reports/ | |
| retention-days: 30 | |
| - name: Upload coverage reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-common | |
| path: persistence-common/target/site/jacoco/ | |
| retention-days: 30 | |
| build: | |
| name: Build Persistence Common | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Build persistence-common | |
| working-directory: ./persistence-common | |
| run: mvn clean package -DskipTests | |
| - name: Upload JAR artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: persistence-common-jar | |
| path: persistence-common/target/*.jar | |
| retention-days: 7 | |
| # comments for publish job will be remove, until all integraiton and examples works fine | |
| # publish: | |
| # name: Publish to Maven Central | |
| # runs-on: ubuntu-latest | |
| # needs: [test, build] | |
| # # Only run if secrets are configured and on main branch | |
| # if: github.event_name == 'push' && github.ref == 'refs/heads/main' && secrets.MAVEN_USERNAME != '' | |
| # steps: | |
| # - name: Checkout code | |
| # uses: actions/checkout@v4 | |
| # - name: Set up JDK 17 | |
| # uses: actions/setup-java@v4 | |
| # with: | |
| # java-version: '17' | |
| # distribution: 'temurin' | |
| # cache: maven | |
| # # GPG signing is required for Maven Central publication | |
| # # Maven Central requires all artifacts to be GPG signed for security | |
| # # If you don't need to publish to Maven Central, you can remove this job entirely | |
| # - name: Configure GPG Key for Artifact Signing | |
| # env: | |
| # GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| # GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| # run: | | |
| # if [ -z "$GPG_PRIVATE_KEY" ] || [ -z "$GPG_PASSPHRASE" ]; then | |
| # echo "GPG keys not configured. Skipping Maven Central publication." | |
| # exit 0 | |
| # fi | |
| # echo "$GPG_PRIVATE_KEY" | gpg --batch --import | |
| # echo "default-cache-ttl 600" >> ~/.gnupg/gpg.conf | |
| # - name: Publish to Maven Central | |
| # working-directory: ./persistence-common | |
| # env: | |
| # MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
| # MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
| # run: | | |
| # if [ -z "$MAVEN_USERNAME" ] || [ -z "$MAVEN_PASSWORD" ]; then | |
| # echo "Maven Central credentials not configured. Skipping publication." | |
| # exit 0 | |
| # fi | |
| # mvn clean deploy -P release \ | |
| # -DskipTests \ | |
| # -Dgpg.passphrase=$GPG_PASSPHRASE |