chore: updated examples to be directly runnable #45
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: Java CI | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up JDK 22 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '22' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Build and verify | |
| run: ./mvnw --no-transfer-progress --batch-mode verify | |
| - name: Run IT tests | |
| shell: bash | |
| run: | | |
| MVN="./mvnw --no-transfer-progress --batch-mode verify -DskipITs=false -Dsurefire.skip=true" | |
| if [[ "$RUNNER_OS" == "Linux" ]]; then | |
| # Allocate a PTY so /dev/tty is available for the Terminal IT tests | |
| script -q -e -c "$MVN" /dev/null | |
| elif [[ "$RUNNER_OS" == "macOS" ]]; then | |
| # BSD script: command args follow the output file | |
| script -q /dev/null $MVN | |
| else | |
| $MVN | |
| fi |