-
Notifications
You must be signed in to change notification settings - Fork 903
Introduce GitHub Actions based CI workflow #544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8fde9ef
Introduce basic GitHub workflow
sormuras 4e9fc0b
Introduce basic GitHub workflow
sormuras 17d6b1f
Replace Travis CI and AppVeyor checks with GitHub Actions' equivalents
sormuras c2d1c74
Run with Java 14
sormuras 380bc6b
Back to 15 with using bash on all platforms
sormuras 6faf60c
Prepare publishing snapshots
sormuras b8793f9
Restore AppVeyor configuration for the time being
sormuras a689f62
Add Java 11 to the test matrix
sormuras File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| name: CI | ||
|
|
||
| on: [ push, pull_request ] | ||
|
|
||
| jobs: | ||
| test: | ||
| name: "JDK ${{ matrix.java }} on ${{ matrix.os }}" | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
| java: [ 15, 11 ] | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - name: 'Check out repository' | ||
| uses: actions/checkout@v2 | ||
| - name: 'Cache local Maven repository' | ||
| uses: actions/cache@v2 | ||
| with: | ||
| path: ~/.m2/repository | ||
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-maven- | ||
| - name: 'Set up JDK ${{ matrix.java }}' | ||
| uses: actions/setup-java@v1 | ||
| with: | ||
| java-version: ${{ matrix.java }} | ||
| - name: 'Install' | ||
| shell: bash | ||
| run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V | ||
| - name: 'Test' | ||
| shell: bash | ||
| run: mvn test -B | ||
|
|
||
| publish_snapshot: | ||
| name: 'Publish snapshot' | ||
| needs: test | ||
| if: github.event_name == 'push' && github.repository == 'google/google-java-format' && github.ref == 'refs/heads/master' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: 'Check out repository' | ||
| uses: actions/checkout@v2 | ||
| - name: 'Cache local Maven repository' | ||
| uses: actions/cache@v2 | ||
| with: | ||
| path: ~/.m2/repository | ||
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-maven- | ||
| - name: 'Set up JDK 15' | ||
| uses: actions/setup-java@v1 | ||
| with: | ||
| java-version: 15 | ||
| server-id: sonatype-nexus-snapshots | ||
| server-username: CI_DEPLOY_USERNAME | ||
| server-password: CI_DEPLOY_PASSWORD | ||
| - name: 'Publish' | ||
| run: mvn source:jar deploy -B -DskipTests=true -Dinvoker.skip=true -Dmaven.javadoc.skip=true | ||
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.