From e5503bb281535fe03fc7a0506ce3a4a113c6854d Mon Sep 17 00:00:00 2001 From: Loo Zheng Yuan Date: Fri, 30 Aug 2024 21:02:37 +0800 Subject: [PATCH] chore(ci): update CI pipeline --- .github/workflows/test.yml | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f95cf9c..8d8d9f3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,9 +8,15 @@ on: branches: - main +defaults: + run: + # NOTE: Default option does not include `-o pipefail` as documented + # unless explicitly specifying the `bash` shell. + # https://github.com/actions/runner/issues/353 + shell: bash + jobs: - test-golang: - name: Test on Go ${{ matrix.go }} (${{ matrix.os }}) + test: runs-on: ${{ matrix.os }} timeout-minutes: 3 strategy: @@ -22,30 +28,18 @@ jobs: # - macos-latest - ubuntu-latest go: - # - 1.12 - # - 1.13 - # - 1.14 - # - 1.15 - 1.16 - 1.17 steps: - name: Checkout branch - uses: actions/checkout@v2 + uses: actions/checkout@v4.1.7 - name: Set up Go ${{ matrix.go }} - uses: actions/setup-go@v2 + uses: actions/setup-go@v5.0.2 with: go-version: ${{ matrix.go }} - - name: Cache Go modules - uses: actions/cache@v2 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - name: Lint code run: | make lint