Skip to content

Commit 95afbba

Browse files
authored
Update go.yml
1 parent e9605c1 commit 95afbba

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

.github/workflows/go.yml

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
11
name: Go
2-
on: [push]
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
38

49
jobs:
510

6-
test:
7-
strategy:
8-
matrix:
9-
go-version: [1.18.x, 1.19.x, 1.20.x, 1.21.x]
10-
os: [ubuntu-latest, macos-latest, windows-latest]
11-
targetplatform: [x86, x64]
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v4
18+
with:
19+
go-version: '1.18'
1220

13-
runs-on: ${{ matrix.os }}
21+
- name: Build
22+
run: go build -v ./...
1423

15-
steps:
16-
- name: Checkout code
17-
uses: actions/checkout@v4
18-
- name: Install Go
19-
uses: actions/setup-go@v5
20-
with:
21-
go-version: ${{ matrix.go-version }}
22-
cache: false
23-
- name: Test
24-
run: go test -v ./... -coverprofile=coverage.txt -covermode=atomic
25-
- name: Upload coverage reports to Codecov
26-
uses: codecov/[email protected]
27-
with:
28-
token: ${{ secrets.CODECOV_TOKEN }}
29-
slug: aafeher/go-sitemap-parser
24+
- name: Test
25+
run: go test -v ./... -coverprofile=coverage.txt -covermode=atomic
26+
- name: Upload coverage reports to Codecov
27+
uses: codecov/[email protected]
28+
with:
29+
token: ${{ secrets.CODECOV_TOKEN }}
30+
slug: aafeher/go-sitemap-parser

0 commit comments

Comments
 (0)