From fce4fbd1d404827f71c95c84f7260febed228813 Mon Sep 17 00:00:00 2001 From: LamGC Date: Wed, 22 Jun 2022 01:44:35 +0800 Subject: [PATCH] =?UTF-8?q?build(action):=20=E6=B7=BB=E5=8A=A0=E7=94=A8?= =?UTF-8?q?=E4=BA=8E=E6=A3=80=E6=9F=A5=E6=B5=8B=E8=AF=95=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E7=9A=84=20Action.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加 Action, 用于确定 Push 或 Pull Request 的代码是否能通过所有测试项. --- .github/workflows/build-and-test.yml | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/build-and-test.yml diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000..c87e75f --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,32 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Build and test project + +on: [push, pull_request] + +permissions: + contents: read + +jobs: + build: + timeout-minutes: 8 + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'adopt-hotspot' + cache: 'gradle' + - name: Build and test + uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 + with: + gradle-version: 'wrapper' + arguments: test