Add badges to README for VS Code and Maven Central #287
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
| # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven | |
| # This workflow uses actions that are not certified by GitHub. | |
| # They are provided by a third-party and are governed by | |
| # separate terms of service, privacy policy, and support | |
| # documentation. | |
| name: Java CI with Maven | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| name: Maven test on Java ${{ matrix.java }} | |
| runs-on: ubuntu-latest | |
| env: | |
| SEGMENT_DOWNLOAD_TIMEOUT_MINS: '15' | |
| strategy: | |
| matrix: | |
| java: ['20'] | |
| steps: | |
| # Checkout the repository code | |
| - uses: actions/checkout@v3 | |
| # Set up JDK 20 | |
| - name: Set up JDK 20 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: 'temurin' | |
| cache: maven | |
| # Cache Maven dependencies (adjust cache key to optimize) | |
| - name: Cache Maven dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-v2-${{ hashFiles('**/pom.xml') }} # Cache dependencies based on pom.xml changes | |
| restore-keys: | | |
| ${{ runner.os }}-maven-v2- | |
| # Build the project (compiles and packages the code) | |
| - name: Build the project | |
| run: mvn -B clean install --file pom.xml --batch-mode --fail-fast -Dgpg.skip=true -Dmaven.deploy.skip=true | |
| # Run tests | |
| - name: Run tests | |
| run: mvn test -B --file pom.xml --batch-mode --fail-fast |