Skip to content

Commit 010afd3

Browse files
authored
Merge pull request mackerelio#788 from mackerelio/go121
use mackerelio/workflows and upgrade maximum Go version to 1.21
2 parents ce29917 + a2385a6 commit 010afd3

File tree

2 files changed

+36
-57
lines changed

2 files changed

+36
-57
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ updates:
77
time: "01:00"
88
timezone: Asia/Tokyo
99
open-pull-requests-limit: 10
10+
groups:
11+
golang/x:
12+
patterns:
13+
- "golang.org/x/*"
14+
mackerelio:
15+
patterns:
16+
- "github.com/mackerelio/*"
17+
testlibs:
18+
patterns:
19+
- "github.com/elazarl/goproxy*"
20+
- "github.com/stretchr/testify"
1021
- package-ecosystem: github-actions
1122
directory: "/"
1223
schedule:

.github/workflows/test.yml

Lines changed: 25 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -12,65 +12,32 @@ env:
1212
DEBIAN_FRONTEND: noninteractive
1313
jobs:
1414
lint:
15-
strategy:
16-
matrix:
17-
os: [ubuntu-latest, macos-latest, windows-latest]
18-
runs-on: ${{ matrix.os }}
19-
steps:
20-
- uses: actions/checkout@v3
21-
- uses: golangci/golangci-lint-action@v3
22-
with:
23-
args: --timeout 5m
15+
uses: mackerelio/workflows/.github/workflows/[email protected]
2416
test:
25-
strategy:
26-
matrix:
27-
go: ["1.19.x", "1.18.x"]
28-
os: [ubuntu-latest, windows-latest]
29-
runs-on: ${{ matrix.os }}
30-
steps:
31-
- uses: actions/setup-go@v4
32-
with:
33-
go-version: ${{ matrix.go }}
34-
- uses: actions/checkout@v3
35-
- uses: actions/cache@v3
36-
with:
37-
path: ~/go/pkg/mod
38-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
39-
restore-keys: |
40-
${{ runner.os }}-go-
41-
- run: |
42-
go test -race -covermode=atomic -coverprofile=prof.out ./...
43-
shell: bash
44-
- if: matrix.os == 'ubuntu-latest'
45-
run: |
46-
./test.bash
47-
make testconvention
48-
- if: matrix.os == 'windows-latest'
49-
run: |
50-
go build -o check-log/check-log.exe ./check-log
51-
go build -o check-procs/check-procs.exe ./check-procs
52-
go build -o check-windows-eventlog/check-windows-evenglog.exe ./check-windows-eventlog
53-
go build -o check-ntservice/check-ntservice.exe ./check-ntservice
54-
go build -o check-disk/check-disk.exe ./check-disk
55-
go build -o check-uptime/check-uptime.exe ./check-uptime
56-
go build -o check-tcp/check-tcp.exe ./check-tcp
57-
go build -o check-file-age/check-file-age.exe ./check-file-age
58-
- uses: shogo82148/actions-goveralls@v1
59-
with:
60-
github-token: ${{ secrets.GITHUB_TOKEN }}
61-
path-to-profile: prof.out
62-
parallel: true
63-
flag-name: ${{ matrix.os }}_go${{ matrix.go }}
64-
finish:
65-
needs: test
66-
runs-on: ubuntu-latest
67-
steps:
68-
- uses: shogo82148/actions-goveralls@v1
69-
with:
70-
github-token: ${{ secrets.GITHUB_TOKEN }}
71-
parallel-finished: true
17+
uses: mackerelio/workflows/.github/workflows/[email protected]
18+
test-linux:
19+
uses: mackerelio/workflows/.github/workflows/[email protected]
20+
with:
21+
run: |
22+
./test.bash
23+
make testconvention
24+
os-versions: '["ubuntu-22.04"]'
25+
test-windows:
26+
uses: mackerelio/workflows/.github/workflows/[email protected]
27+
with:
28+
run: |
29+
go build -o check-log/check-log.exe ./check-log
30+
go build -o check-procs/check-procs.exe ./check-procs
31+
go build -o check-windows-eventlog/check-windows-evenglog.exe ./check-windows-eventlog
32+
go build -o check-ntservice/check-ntservice.exe ./check-ntservice
33+
go build -o check-disk/check-disk.exe ./check-disk
34+
go build -o check-uptime/check-uptime.exe ./check-uptime
35+
go build -o check-tcp/check-tcp.exe ./check-tcp
36+
go build -o check-file-age/check-file-age.exe ./check-file-age
37+
os-versions: '["windows-2022"]'
38+
# TODO: use workflows repo
7239
build:
73-
needs: test
40+
needs: [test, test-linux]
7441
runs-on: ubuntu-latest
7542
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
7643
steps:
@@ -95,6 +62,7 @@ jobs:
9562
path: |
9663
~/rpmbuild/RPMS/*/*.rpm
9764
packaging/*.deb
65+
# TODO: use workflows repo
9866
release:
9967
needs: build
10068
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)