|
12 | 12 | DEBIAN_FRONTEND: noninteractive
|
13 | 13 | jobs:
|
14 | 14 | 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] |
24 | 16 | 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 |
72 | 39 | build:
|
73 |
| - needs: test |
| 40 | + needs: [test, test-linux] |
74 | 41 | runs-on: ubuntu-latest
|
75 | 42 | if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
|
76 | 43 | steps:
|
|
95 | 62 | path: |
|
96 | 63 | ~/rpmbuild/RPMS/*/*.rpm
|
97 | 64 | packaging/*.deb
|
| 65 | + # TODO: use workflows repo |
98 | 66 | release:
|
99 | 67 | needs: build
|
100 | 68 | runs-on: ubuntu-latest
|
|
0 commit comments