From 2060c255ba8043e074b0fd398b3cf51a28631c16 Mon Sep 17 00:00:00 2001 From: grq <598971882@qq.com> Date: Mon, 26 Aug 2024 17:59:57 +0800 Subject: [PATCH 1/3] junit test with Maven --- .github/workflows/test.yml | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..ce6ebcf2 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,43 @@ +name: junit test with Maven + +on: + push: + branches: [ test ] + pull_request: + branches: [ test ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout gsp_sqlfiles + uses: actions/checkout@v3 + with: + repository: liaowuhen2/gsp_sqlfiles@dev + path: gsp_sqlfiles + fetch-depth: 0 + - name: Checkout gsp_demo + - uses: actions/checkout@v3 + - name: Set up JDK 8 + uses: actions/setup-java@v3 + with: + java-version: '8' + distribution: 'temurin' + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build with Maven + env: + MAVEN_OPTS: -Xss2M + JAVA_OPTS: -Xss2M + run: mvn -B package --file pom.xml + - name: Run tests with Maven + env: + MAVEN_OPTS: -Xss2M + JAVA_OPTS: -Xss2M + run: mvn -B test --file pom.xml \ No newline at end of file From 34845ecc6496f54c87f12c84f27a3ecae00cbc50 Mon Sep 17 00:00:00 2001 From: grq <598971882@qq.com> Date: Mon, 26 Aug 2024 18:03:14 +0800 Subject: [PATCH 2/3] fix bug --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ce6ebcf2..af2f5786 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: path: gsp_sqlfiles fetch-depth: 0 - name: Checkout gsp_demo - - uses: actions/checkout@v3 + uses: actions/checkout@v3 - name: Set up JDK 8 uses: actions/setup-java@v3 with: From d9e79f44f1a584145fa397b297c66f8b8b716e7d Mon Sep 17 00:00:00 2001 From: grq <598971882@qq.com> Date: Mon, 26 Aug 2024 18:11:01 +0800 Subject: [PATCH 3/3] fix bug --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index af2f5786..231e0bef 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,8 @@ jobs: - name: Checkout gsp_sqlfiles uses: actions/checkout@v3 with: - repository: liaowuhen2/gsp_sqlfiles@dev + repository: liaowuhen2/gsp_sqlfiles + ref: dev path: gsp_sqlfiles fetch-depth: 0 - name: Checkout gsp_demo