From b74fc68fea684a0aaf35bec9f9ef49b5051cc8f6 Mon Sep 17 00:00:00 2001 From: qydysky Date: Sun, 21 May 2023 15:28:59 +0800 Subject: [PATCH] =?utf8?q?Improve=20=E5=8A=A0=E5=BF=AB=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .github/workflows/go.yml | 40 +++++++++++++++++++------------------- .github/workflows/test.yml | 40 +++++++++++++++++++------------------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d6287f7..41bc95a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -8,8 +8,8 @@ on: - 'VERSION' jobs: - u-build: - name: build_ubuntu_go${{ matrix.go }} + buildtest: + name: test_ubuntu_go${{ matrix.go }} runs-on: ubuntu-latest strategy: matrix: @@ -27,7 +27,7 @@ jobs: uses: golangci/golangci-lint-action@v3 with: args: --timeout 5m --verbose - + - name: Test run: | sudo apt-get update @@ -40,6 +40,22 @@ jobs: with: token: ${{secrets.CODECOV_TOKEN}} file: coverage + + u-build: + name: build_ubuntu_go${{ matrix.go }} + needs: [buildtest] + runs-on: ubuntu-latest + strategy: + matrix: + go: [ '1.20' ] + steps: + - name: Set up Go${{ matrix.go }} + uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go }} + + - name: Check out code + uses: actions/checkout@v3 - name: Build run: | @@ -61,6 +77,7 @@ jobs: w-build: name: build_windows_go${{ matrix.go }} + needs: [buildtest] runs-on: windows-latest strategy: matrix: @@ -74,23 +91,6 @@ jobs: - name: Check out code uses: actions/checkout@v3 - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 - with: - args: --timeout 5m --verbose - - - name: Test - run: | - set CGO_ENABLED=0 - go get . - go test -v --cover -coverprofile=coverage ./... - - - name: Codecov - uses: codecov/codecov-action@v3 - with: - token: ${{secrets.CODECOV_TOKEN}} - file: coverage - - name: Build run: | cd demo diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4c60a86..c7a6258 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,8 +11,8 @@ on: - '**.sum' jobs: - u-build: - name: build_ubuntu_go${{ matrix.go }} + buildtest: + name: test_ubuntu_go${{ matrix.go }} runs-on: ubuntu-latest strategy: matrix: @@ -43,7 +43,23 @@ jobs: with: token: ${{secrets.CODECOV_TOKEN}} file: coverage - + + u-build: + name: build_ubuntu_go${{ matrix.go }} + needs: [buildtest] + runs-on: ubuntu-latest + strategy: + matrix: + go: [ '1.20' ] + steps: + - name: Set up Go${{ matrix.go }} + uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go }} + + - name: Check out code + uses: actions/checkout@v3 + - name: Build run: | cd demo @@ -62,6 +78,7 @@ jobs: w-build: name: build_windows_go${{ matrix.go }} + needs: [buildtest] runs-on: windows-latest strategy: matrix: @@ -75,23 +92,6 @@ jobs: - name: Check out code uses: actions/checkout@v3 - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 - with: - args: --timeout 5m --verbose - - - name: Test - run: | - set CGO_ENABLED=0 - go get . - go test -v --cover -coverprofile=coverage ./... - - - name: Codecov - uses: codecov/codecov-action@v3 - with: - token: ${{secrets.CODECOV_TOKEN}} - file: coverage - - name: Build run: | cd demo -- 2.39.2