Skip to content

Commit

Permalink
chore: update ci (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
skanehira authored Aug 16, 2024
1 parent f35cd0b commit 3b468a8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 24 deletions.
34 changes: 12 additions & 22 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,49 +12,39 @@ jobs:
lint:
strategy:
matrix:
go-version: [1.x]
os: [
# NOTE: ignore windows because it will be timeout
#windows-latest,
macos-latest,
ubuntu-latest
]
os: [windows-latest, macos-latest, ubuntu-latest]
name: golangci-lint
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v4
go-version-file: "go.mod"
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.54
- name: go vet
run: go vet ./...
version: v1.60.1
- name: go build
run: go build
test:
strategy:
matrix:
go-version: [1.x]
os: [windows-latest, macos-latest, ubuntu-latest]
name: test
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/[email protected]
- name: Install Go
id: setup-go
uses: actions/setup-go@v5
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version-file: "go.mod"
- name: Download Go modules
shell: bash
if: ${{ steps.setup-go.outputs.cache-hit != 'true' }}
run: go mod download
- name: go test
run: go test -v ./... -coverprofile=coverage.out
- uses: k1LoW/octocov-action@v1
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
- name: Install Go
id: setup-go
uses: actions/setup-go@v5
with:
go-version: 1.x
go-version-file: "go.mod"
- name: Download Go modules
shell: bash
if: ${{ steps.setup-go.outputs.cache-hit != 'true' }}
run: go mod download
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
Expand Down

0 comments on commit 3b468a8

Please sign in to comment.