From 7c9c1903c43f48c370356ba0a185a3ecd73079ca Mon Sep 17 00:00:00 2001 From: Zexi Li Date: Fri, 1 Dec 2023 13:30:36 +0800 Subject: [PATCH] feat: use github workflows --- .github/pull_request_template.md | 2 +- .github/workflows/ci-pr-build-test.yml | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci-pr-build-test.yml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 6a27e66..73aa08d 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1 +1 @@ -**这个 PR 实现什么功能/修复什么问题**: +**What this PR does / why we need it**: diff --git a/.github/workflows/ci-pr-build-test.yml b/.github/workflows/ci-pr-build-test.yml new file mode 100644 index 0000000..4e5b9a8 --- /dev/null +++ b/.github/workflows/ci-pr-build-test.yml @@ -0,0 +1,23 @@ +name: Building and test for PR + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + build_and_test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: '1.18' + + - name: Run go test + shell: bash + run: | + set -o xtrace + echo $GITHUB_WORKSPACE + go test -v ./...