Skip to content

Commit

Permalink
Upgrade github action version
Browse files Browse the repository at this point in the history
Signed-off-by: “JermaineHua” <[email protected]>
  • Loading branch information
CrazyHZM committed Nov 4, 2024
1 parent e5383b9 commit b46f1ef
Show file tree
Hide file tree
Showing 5 changed files with 160 additions and 156 deletions.
106 changes: 55 additions & 51 deletions .github/workflows/build-and-test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ jobs:
needs: check-format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Check License"
uses: apache/skywalking-eyes@e1a02359b239bd28de3f6d35fdc870250fa513d5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Set up JDK 21"
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
Expand All @@ -107,11 +107,11 @@ jobs:
version: ${{ steps.dubbo-version.outputs.version }}
steps:
- name: "Checkout code"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: dubbo
- name: "Set up JDK"
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
Expand Down Expand Up @@ -155,15 +155,15 @@ jobs:
shopt -s globstar
zip ${{ github.workspace }}/class.zip **/target/classes/* -r
- name: "Upload class result"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: "class-file"
path: ${{ github.workspace }}/class.zip
- name: "Pack checkstyle file if failure"
if: failure()
run: zip ${{ github.workspace }}/checkstyle.zip *checkstyle* -r
- name: "Upload checkstyle file if failure"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: "checkstyle-file"
Expand Down Expand Up @@ -221,11 +221,11 @@ jobs:
ZOOKEEPER_VERSION: 3.7.2
steps:
- name: "Checkout code"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Set up JDK ${{ matrix.jdk }}"
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
Expand Down Expand Up @@ -256,7 +256,7 @@ jobs:
if: failure()
run: cat test_errors.log
- name: "Upload coverage result"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-result
path: "**/target/site/**/jacoco.xml"
Expand All @@ -267,14 +267,14 @@ jobs:
env:
JOB_COUNT: 3
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: 'apache/dubbo-samples'
ref: master
- name: "Prepare test list"
run: bash ./test/scripts/prepare-test.sh
- name: "Upload test list"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: samples-test-list
path: test/jobs
Expand All @@ -289,9 +289,9 @@ jobs:
strategy:
fail-fast: false
matrix:
job_id: [1, 2, 3]
job_id: [1,2,3]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: 'apache/dubbo-samples'
ref: master
Expand All @@ -314,12 +314,12 @@ jobs:
${{ runner.os }}-dubbo-snapshot-${{ github.sha }}
${{ runner.os }}-dubbo-snapshot-
- name: "Download test list"
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: samples-test-list
path: test/jobs/
- name: "Set up JDK 8"
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 8
Expand All @@ -335,15 +335,15 @@ jobs:
- name: "merge jacoco result"
run: cd test/dubbo-test-jacoco-merger && mvn clean compile exec:java -Dexec.mainClass="org.apache.dubbo.test.JacocoMerge" -Dexec.args="${{github.workspace}}"
- name: "Upload jacoco"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: samples-jacoco-result
name: samples-jacoco-result-${{matrix.job_id}}
path: target/jacoco*.exec
- name: "Upload test result"
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: samples-test-result
name: samples-test-result-${{matrix.job_id}}
path: test/jobs/*-result*
samples-test-result:
needs: [check-format, samples-test-job]
Expand All @@ -352,14 +352,14 @@ jobs:
env:
JAVA_VER: 8
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: 'apache/dubbo-samples'
ref: master
- name: "Download test result"
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: samples-test-result
pattern: samples-test-result-*
path: test/jobs/
- name: "Merge test result"
run: ./test/scripts/merge-test-results.sh
Expand All @@ -370,14 +370,14 @@ jobs:
env:
JOB_COUNT: 3
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: 'apache/dubbo-integration-cases'
ref: main
- name: "Prepare test list"
run: bash ./test/scripts/prepare-test.sh
- name: "Upload test list"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-list
path: test/jobs
Expand All @@ -392,9 +392,9 @@ jobs:
strategy:
fail-fast: false
matrix:
job_id: [1, 2, 3]
job_id: [1,2,3]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: 'apache/dubbo-integration-cases'
ref: main
Expand All @@ -417,12 +417,12 @@ jobs:
${{ runner.os }}-dubbo-snapshot-${{ github.sha }}
${{ runner.os }}-dubbo-snapshot-
- name: "Download test list"
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: test-list
path: test/jobs/
- name: "Set up JDK 8"
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 8
Expand All @@ -438,15 +438,15 @@ jobs:
- name: "merge jacoco result"
run: cd test/dubbo-test-jacoco-merger && mvn clean compile exec:java -Dexec.mainClass="org.apache.dubbo.test.JacocoMerge" -Dexec.args="${{github.workspace}}"
- name: "Upload jacoco"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: jacoco-result
name: jacoco-result-${{matrix.job_id}}
path: target/jacoco*.exec
- name: "Upload test result"
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-result
name: test-result-${{matrix.job_id}}
path: test/jobs/*-result*
integration-test-result:
needs: [check-format, integration-test-job]
Expand All @@ -455,14 +455,14 @@ jobs:
env:
JAVA_VER: 8
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: 'apache/dubbo-integration-cases'
ref: main
- name: "Download test result"
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: test-result
pattern: test-result-*
path: test/jobs/
- name: "Merge test result"
run: ./test/scripts/merge-test-results.sh
Expand All @@ -471,40 +471,43 @@ jobs:
runs-on: ubuntu-latest
needs: [check-format, integration-test-result, samples-test-result, unit-test]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: "./dubbo"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: 'apache/dubbo-samples'
path: "./dubbo-samples"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: 'apache/dubbo-integration-cases'
path: "./dubbo-integration-cases"
- name: "Set up JDK 21"
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- name: "Restore class result"
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: "class-file"
github-token: ${{ secrets.GITHUB_TOKEN }}
path: ${{ github.workspace }}
- name: "Unpack class result"
run: |
cd ${{ github.workspace }}/dubbo
unzip -o ${{ github.workspace }}/class.zip
- name: "Restore jacoco exec"
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: samples-jacoco-result
pattern: samples-jacoco-result-*
github-token: ${{ secrets.GITHUB_TOKEN }}
path: dubbo-samples/target/
- name: "Restore integration jacoco exec"
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: jacoco-result
pattern: jacoco-result-*
github-token: ${{ secrets.GITHUB_TOKEN }}
path: dubbo-integration-cases/target/
- name: "Merge jacoco result"
run: |
Expand All @@ -515,29 +518,30 @@ jobs:
cd ${{ github.workspace }}/dubbo-integration-cases/test/dubbo-test-jacoco-merger
mvn clean compile exec:java -Dexec.mainClass="org.apache.dubbo.test.JacocoReport" -Dexec.args="${{github.workspace}}/dubbo-integration-cases ${{github.workspace}}/dubbo"
- name: "Restore coverage result"
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: coverage-result
github-token: ${{ secrets.GITHUB_TOKEN }}
path: dubbo/
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
verbose: true

error-code-inspecting:
needs: check-format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: "./dubbo"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: 'apache/dubbo-test-tools'
ref: main
path: "./dubbo-test-tools"
- name: "Set up JDK 21"
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
Expand All @@ -563,7 +567,7 @@ jobs:
- name: "Upload error code inspection result"
# always() should not be used here, since we don't need to handle the 'canceled' situation.
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: "error-inspection-result"
path: ${{ github.workspace }}/dubbo-test-tools/dubbo-error-code-inspector/error-inspection-result.txt
Expand All @@ -572,7 +576,7 @@ jobs:
needs: check-format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: "./dubbo"
- name: "Setup GraalVM environment"
Expand Down
Loading

0 comments on commit b46f1ef

Please sign in to comment.