Skip to content

Commit

Permalink
chore(ci): update CI pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
loozhengyuan committed Aug 30, 2024
1 parent 0860468 commit e5503bb
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit e5503bb

Please sign in to comment.