From 3c12297e315fc5e409b662d573af9a4aa72de5de Mon Sep 17 00:00:00 2001 From: suyiiyii Date: Mon, 20 Jan 2025 23:35:52 +0800 Subject: [PATCH] =?UTF-8?q?ci(github):=20=E6=9B=B4=E6=96=B0=20Go=20?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81=E4=BB=A5=E6=94=AF=E6=8C=81=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加矩阵策略,为 facade、auth 和 user 服务配置构建和测试 - 修改构建和测试步骤,以针对矩阵中的每个服务执行 --- .github/workflows/go.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 6092f4a..92d4653 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -13,16 +13,19 @@ jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + service: [ "facade", "auth" ,"user" ] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.23' + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.23' - - name: Build - run: go build -v ./... + - name: Build + run: go build -v app/${{ matrix.service }}/... - - name: Test - run: go test -v ./... + - name: Test + run: go test -v app/${{ matrix.service }}/...