diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..231e0bef --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,44 @@ +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 + ref: 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