Rename the published artifact to monovm-whois-java #2
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: CI | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Java ${{ matrix.java }} on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # 17 is the baseline the artifact targets; the newer LTS releases guard against | |
| # regressions from language and JDK changes. | |
| java: ['17', '21', '25'] | |
| os: [ubuntu-latest] | |
| include: | |
| - java: '17' | |
| os: windows-latest | |
| - java: '17' | |
| os: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: ${{ matrix.java }} | |
| cache: maven | |
| - name: Build and test | |
| run: mvn -B -ntp verify | |
| - name: Upload test reports | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: surefire-reports-java${{ matrix.java }}-${{ matrix.os }} | |
| path: target/surefire-reports/ | |
| retention-days: 7 | |
| php-parity: | |
| name: Parity data is current | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| extensions: json | |
| - name: Check out the PHP package | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: monovm/whois-php | |
| path: .whois-php | |
| - name: Regenerate the recorded verdicts | |
| run: php tools/generate-php-parity.php .whois-php | |
| - name: Fail if they differ from what is committed | |
| run: | | |
| if ! git diff --quiet -- src/test/resources/fixtures/php-parity.json; then | |
| echo "::error::php-parity.json is out of date. Run:" | |
| echo "::error:: php tools/generate-php-parity.php /path/to/whois-php" | |
| git --no-pager diff -- src/test/resources/fixtures/php-parity.json | |
| exit 1 | |
| fi | |
| live: | |
| name: Live registry lookups | |
| runs-on: ubuntu-latest | |
| # Real registries throttle and occasionally refuse; this must never block a pull request. | |
| continue-on-error: true | |
| if: github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| cache: maven | |
| - name: Query real WHOIS servers | |
| run: mvn -B -ntp -Dwhois.liveTests=true test |