Skip to content

Commit 40c9e55

Browse files
committed
github: Format workflow file
1 parent 9c01cfa commit 40c9e55

File tree

1 file changed

+40
-40
lines changed

1 file changed

+40
-40
lines changed

‎.github/workflows/test.yml‎

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
11
on:
22
push:
3-
branches: [ main ]
3+
branches: [main]
44
pull_request:
55
name: Test
66
jobs:
77
test:
88
strategy:
99
matrix:
10-
go-version: [1.20.x,1.21.x]
10+
go-version: [1.20.x, 1.21.x]
1111
platform: [ubuntu-latest, macos-latest, windows-latest]
1212
runs-on: ${{ matrix.platform }}
1313
steps:
14-
- name: Install Go
15-
uses: actions/setup-go@v4
16-
with:
17-
go-version: ${{ matrix.go-version }}
18-
- name: Install staticcheck
19-
run: go install honnef.co/go/tools/cmd/staticcheck@latest
20-
shell: bash
21-
- name: Install golint
22-
run: go install golang.org/x/lint/golint@latest
23-
shell: bash
24-
- name: Update PATH
25-
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
26-
shell: bash
27-
- name: Checkout code
28-
uses: actions/checkout@v3
29-
- name: Fmt
30-
if: matrix.platform != 'windows-latest' # :(
31-
run: "diff <(gofmt -d .) <(printf '')"
32-
shell: bash
33-
- name: Vet
34-
run: go vet ./...
35-
- name: Staticcheck
36-
run: staticcheck ./...
37-
- name: Lint
38-
run: golint ./...
39-
- name: Test
40-
run: go test -race ./... -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic
41-
- name: Upload coverage
42-
if: success() && matrix.platform == 'ubuntu-latest'
43-
run: |
44-
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step
45-
curl -Os https://uploader.codecov.io/latest/linux/codecov
46-
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
47-
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
48-
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
49-
shasum -a 256 -c codecov.SHA256SUM
50-
chmod +x codecov
51-
./codecov
14+
- name: Install Go
15+
uses: actions/setup-go@v4
16+
with:
17+
go-version: ${{ matrix.go-version }}
18+
- name: Install staticcheck
19+
run: go install honnef.co/go/tools/cmd/staticcheck@latest
20+
shell: bash
21+
- name: Install golint
22+
run: go install golang.org/x/lint/golint@latest
23+
shell: bash
24+
- name: Update PATH
25+
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
26+
shell: bash
27+
- name: Checkout code
28+
uses: actions/checkout@v3
29+
- name: Fmt
30+
if: matrix.platform != 'windows-latest' # :(
31+
run: "diff <(gofmt -d .) <(printf '')"
32+
shell: bash
33+
- name: Vet
34+
run: go vet ./...
35+
- name: Staticcheck
36+
run: staticcheck ./...
37+
- name: Lint
38+
run: golint ./...
39+
- name: Test
40+
run: go test -race ./... -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic
41+
- name: Upload coverage
42+
if: success() && matrix.platform == 'ubuntu-latest'
43+
run: |
44+
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step
45+
curl -Os https://uploader.codecov.io/latest/linux/codecov
46+
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
47+
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
48+
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
49+
shasum -a 256 -c codecov.SHA256SUM
50+
chmod +x codecov
51+
./codecov

0 commit comments

Comments
 (0)