Skip to content

Commit

Permalink
Update common files
Browse files Browse the repository at this point in the history
  • Loading branch information
micronaut-build committed Jan 24, 2023
1 parent 5c6b34a commit 95e3621
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 14 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/graalvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['17']
graalvm: ['latest', 'dev']
graalvm: [ 'latest', 'dev' ]
java: [ '17' ]
include:
- graalvm: 'dev'
java: '19'
exclude:
- graalvm: 'dev'
java: '17'
steps:
# https://github.com/actions/virtual-environments/issues/709
- name: Free disk space
Expand All @@ -42,7 +48,11 @@ jobs:
version: ${{ matrix.graalvm }}
java-version: ${{ matrix.java }}
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.3.3
- name: Build with Gradle
id: gradle
run: |
if ./gradlew tasks --no-daemon --all | grep -w "testNativeImage"
then
Expand All @@ -52,10 +62,24 @@ jobs:
fi
env:
TESTCONTAINERS_RYUK_DISABLED: true
GH_TOKEN_PUBLIC_REPOS_READONLY: ${{ secrets.GH_TOKEN_PUBLIC_REPOS_READONLY }}
GH_USERNAME: ${{ secrets.GH_USERNAME }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
PREDICTIVE_TEST_SELECTION: "${{ github.event_name == 'pull_request' && 'true' || 'false' }}"
- name: Add build scan URL as PR comment
uses: actions/github-script@v5
if: github.event_name == 'pull_request' && failure()
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '❌ ${{ github.workflow }} ${{ matrix.java }} ${{ matrix.graalvm }} failed: ${{ steps.gradle.outputs.build-scan-url }}'
})
- name: Publish Test Report
if: always()
uses: mikepenz/action-junit-report@v3.7.1
Expand Down
25 changes: 19 additions & 6 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,13 @@ jobs:
sudo apt-get clean
df -h
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.3.3
- name: Optional setup step
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
Expand All @@ -48,14 +44,29 @@ jobs:
run: |
[ -f ./setup.sh ] && ./setup.sh || true
- name: Build with Gradle
id: gradle
run: |
./gradlew check --no-daemon --parallel --continue
env:
GH_TOKEN_PUBLIC_REPOS_READONLY: ${{ secrets.GH_TOKEN_PUBLIC_REPOS_READONLY }}
GH_USERNAME: ${{ secrets.GH_USERNAME }}
TESTCONTAINERS_RYUK_DISABLED: true
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
PREDICTIVE_TEST_SELECTION: "${{ github.event_name == 'pull_request' && 'true' || 'false' }}"
- name: Add build scan URL as PR comment
uses: actions/github-script@v5
if: github.event_name == 'pull_request' && failure()
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '❌ ${{ github.workflow }} failed: ${{ steps.gradle.outputs.build-scan-url }}'
})
- name: Publish Test Report
if: always()
uses: mikepenz/action-junit-report@v3.7.1
Expand All @@ -72,6 +83,8 @@ jobs:
- name: Publish to Sonatype Snapshots
if: success() && github.event_name == 'push' && matrix.java == '17'
env:
GH_TOKEN_PUBLIC_REPOS_READONLY: ${{ secrets.GH_TOKEN_PUBLIC_REPOS_READONLY }}
GH_USERNAME: ${{ secrets.GH_USERNAME }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@ jobs:
path: artifacts-sha256
retention-days: 5
- name: Generate docs
run: ./gradlew docs
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
run: ./gradlew docs
GH_TOKEN_PUBLIC_REPOS_READONLY: ${{ secrets.GH_TOKEN_PUBLIC_REPOS_READONLY }}
GH_USERNAME: ${{ secrets.GH_USERNAME }}
- name: Export Gradle Properties
uses: micronaut-projects/github-actions/export-gradle-properties@master
- name: Publish to Github Pages
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,3 @@ src/main/docs/resources/css/*.css
src/main/docs/resources/js/*.js
src/main/docs/resources/style/*.html
src/main/docs/resources/img/micronaut-logo-white.svg
*Generated*.java
/aws-ua/src/main/java/io/micronaut/aws/ua/GeneratedUserAgentProvider.java
8 changes: 5 additions & 3 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,13 @@
<!-- Checks for Javadoc comments. -->
<!-- See https://checkstyle.org/config_javadoc.html -->
<module name="JavadocMethod">
<property name="excludeScope" value="private"/>
<property name="accessModifiers" value="public, protected"/>
</module>
<module name="JavadocType"/>
<module name="JavadocStyle"/>
<module name="MissingJavadocType"/>
<module name="MissingJavadocType">
<property name="severity" value="warning"/>
</module>

<!-- Checks for Naming Conventions. -->
<!-- See https://checkstyle.org/config_naming.html -->
Expand All @@ -118,7 +120,7 @@
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
<module name="RedundantImport"/>
<module name="UnusedImports">
<property name="processJavadoc" value="false"/>
<property name="processJavadoc" value="true"/>
</module>

<!-- Checks for Size Violations. -->
Expand Down

0 comments on commit 95e3621

Please sign in to comment.