From 0e95727de19c7083b0bd851038ccd341c1ef9ba0 Mon Sep 17 00:00:00 2001 From: Lan Tian Date: Wed, 6 Sep 2023 20:55:45 -0700 Subject: [PATCH] general: reorganize GitHub Actions workflows and readd unit test --- .github/workflows/docker-develop.yaml | 2 +- .github/workflows/docker-release.yaml | 2 +- .github/workflows/go-release.yaml | 2 +- .github/workflows/go-test.yaml | 28 +++++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/go-test.yaml diff --git a/.github/workflows/docker-develop.yaml b/.github/workflows/docker-develop.yaml index 7d00d4c..3d8dd42 100644 --- a/.github/workflows/docker-develop.yaml +++ b/.github/workflows/docker-develop.yaml @@ -4,7 +4,7 @@ on: - '**' jobs: - docker: + docker-develop: runs-on: ubuntu-latest steps: - name: Set up QEMU diff --git a/.github/workflows/docker-release.yaml b/.github/workflows/docker-release.yaml index 77d907c..3aec12b 100644 --- a/.github/workflows/docker-release.yaml +++ b/.github/workflows/docker-release.yaml @@ -3,7 +3,7 @@ on: types: [created] jobs: - docker: + docker-release: runs-on: ubuntu-latest steps: - name: Set up QEMU diff --git a/.github/workflows/go-release.yaml b/.github/workflows/go-release.yaml index e84314e..7ada55f 100644 --- a/.github/workflows/go-release.yaml +++ b/.github/workflows/go-release.yaml @@ -3,7 +3,7 @@ on: types: [created] jobs: - releases-matrix: + go-release: name: Release Go Binary runs-on: ubuntu-latest strategy: diff --git a/.github/workflows/go-test.yaml b/.github/workflows/go-test.yaml new file mode 100644 index 0000000..d3c8c8c --- /dev/null +++ b/.github/workflows/go-test.yaml @@ -0,0 +1,28 @@ +on: + push: + branches: + - '**' + pull_request: + branches: + - 'master' + +jobs: + go-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + + - run: | + export GO111MODULE=on + cd frontend + go get -v -t -d ./... + go test -v ./... + cd .. + + - run: | + export GO111MODULE=on + cd proxy + go get -v -t -d ./... + go test -v ./... + cd ..