Skip to content

docs:update JDK version configuration in GitHub Actions. #1507

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

Merged
merged 4 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,3 @@ closes #

- [ ] Add information of this PR to CHANGELOG.md in root of project.
- [ ] Add documentation in javadoc or comment below the PR if necessary.

## Checklist (Optional)

- [ ] Will pull request to branch of 2023.
- [ ] Will pull request to branch of 2022.
- [ ] Will pull request to branch of 2021.
- [ ] Will pull request to branch of 2020.
- [ ] Will pull request to branch of hoxton.
34 changes: 34 additions & 0 deletions .github/workflows/codecov_jdk17.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Codecov with JDK 17

on:
push:
branches:
- 2024
- 2023
- 2022
pull_request:
branches:
- 2024
- 2023
- 2022

jobs:
codecov:
runs-on: ubuntu-latest

steps:
- name: Checkout codes
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Test with Maven
run: mvn clean test -B -U -Psonatype
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ${{ github.workspace }}/target/site/jacoco/jacoco.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
name: Codecov
name: Codecov with JDK 8

on:
push:
branches:
- 2023
- 2022
- 2021
- 2020
- hoxton
- greenwich
pull_request:
branches:
- 2023
- 2022
- 2021
- 2020
- hoxton
Expand All @@ -25,11 +21,11 @@ jobs:
steps:
- name: Checkout codes
uses: actions/checkout@v4
- name: Set up JDK 17
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
java-version: 8
- name: Test with Maven
run: mvn clean test -B -U -Psonatype
- name: Upload coverage to Codecov
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Test with Junit (JDK17)
name: Junit Test with JDK from 17 to 21

on:
push:
branches:
- 2024
- 2023
- 2022
pull_request:
branches:
- 2024
- 2023
- 2022

jobs:
build:
strategy:
matrix:
java: [ 17 ]
java: [ 17, 21 ]
os: [ 'windows-latest', 'ubuntu-latest' ]

runs-on: ${{ matrix.os }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Test with Junit
name: Junit Test with JDK from 8 to 21

on:
push:
branches:
- hoxton
- 2021
- 2020
- hoxton
- greenwich
pull_request:
branches:
- hoxton
- 2021
- 2020
- hoxton
- greenwich

jobs:
junit:
strategy:
matrix:
java: [ 8, 11, 17 ]
java: [ 8, 11, 17, 21 ]
os: [ 'windows-latest', 'ubuntu-latest' ]

runs-on: ${{ matrix.os }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/license-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: License checker
on:
push:
branches:
- 2024
- 2023
- 2022
- 2021
Expand All @@ -11,6 +12,7 @@ on:
- greenwich
pull_request:
branches:
- 2024
- 2023
- 2022
- 2021
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
name: Snapshot
name: Snapshot with JDK 17

on:
push:
branches:
- 2024
- 2023
- 2022
- 2021
- 2020
- hoxton
- greenwich

jobs:
check-snapshot:
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/snapshot_jdk8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Snapshot with JDK 8

on:
push:
branches:
- 2021
- 2020
- hoxton
- greenwich

jobs:
check-snapshot:
runs-on: ubuntu-latest
outputs:
IS_SNAPSHOT: ${{ steps.set_output_1.outputs.IS_SNAPSHOT }}
steps:
- name: Checkout codes
uses: actions/checkout@v4
- name: Check deploy type
id: set_output_1
run: |
line="$(grep SNAPSHOT pom.xml || true)"
echo $line
if [ -n "$line" ]; then
echo "IS_SNAPSHOT=true" >> $GITHUB_OUTPUT
else
echo "IS_SNAPSHOT=false" >> $GITHUB_OUTPUT
fi
snapshot:
runs-on: ubuntu-latest
needs: check-snapshot
if: ${{ needs.check-snapshot.outputs.IS_SNAPSHOT == 'true' }}
steps:
- name: Checkout codes
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
server-id: nexus-snapshots
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish package
run: mvn clean deploy -B -U -Psonatype
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@
- [feat: support gateway context, feign eager-load support default value.](https://github.com/Tencent/spring-cloud-tencent/pull/1504)
- [feat:use polaris-all for shading third-party dependencies.](https://github.com/Tencent/spring-cloud-tencent/pull/1505)
- [feat:support default instance circuit breaker rule.](https://github.com/Tencent/spring-cloud-tencent/pull/1506)
- [docs:update JDK version configuration in GitHub Actions.](https://github.com/Tencent/spring-cloud-tencent/pull/1507)
2 changes: 1 addition & 1 deletion spring-cloud-tencent-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<!-- Dependencies -->
<springdoc.version>2.2.0</springdoc.version>
<mocktio.version>4.9.0</mocktio.version>
<byte-buddy.version>1.12.19</byte-buddy.version>
<byte-buddy.version>1.14.19</byte-buddy.version>
<jackson.version>2.15.4</jackson.version>
<system-stubs-jupiter.version>2.0.2</system-stubs-jupiter.version>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;
Expand All @@ -42,6 +43,7 @@
*
* @author Haotian Zhang
*/
@RefreshScope
@RestController
@RequestMapping("/quickstart/callee")
public class QuickstartCalleeController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
Expand All @@ -43,6 +44,7 @@
*
* @author Haotian Zhang
*/
@RefreshScope
@RestController
@RequestMapping("/quickstart/callee")
public class QuickstartCalleeController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ spring:
- Path=/QuickstartCallerService/**
filters:
- StripPrefix=1
- id: QuickstartCalleeService
uri: lb://QuickstartCalleeService
predicates:
- Path=/QuickstartCalleeService/**
filters:
- StripPrefix=1
logging:
file:
name: /sct-demo-logs/${spring.application.name}/root.log
Expand Down
Loading
Loading