...
1on: [push, pull_request]
2name: Build Test
3jobs:
4 build_test_v2:
5 env:
6 GOPATH: ${{ github.workspace }}
7 GO111MODULE: off
8 strategy:
9 matrix:
10 go-version: [1.16.x, 1.17.x]
11 runs-on: ubuntu-20.04
12 steps:
13 - name: Install Go
14 uses: actions/setup-go@v2
15 with:
16 go-version: ${{ matrix.go-version }}
17 - name: Checkout code
18 uses: actions/checkout@v2
19 with:
20 path: ${{ github.workspace }}/src/github.com/shirou/gopsutil
21 - name: Get dependencies
22 if: runner.os != 'Windows'
23 run: |
24 if ! command -v dep &>/dev/null; then
25 mkdir -p $GOPATH/bin
26 curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
27 echo "PATH=$GOPATH/bin:$PATH" >> $GITHUB_PATH
28 fi
29 cd $GOPATH/src/github.com/shirou/gopsutil
30 dep ensure
31 # exclude v3 from being run with ./...
32 rm -rf $GOPATH/src/github.com/shirou/gopsutil/v3
33 - name: Build Test v2
34 run: |
35 cd $GOPATH/src/github.com/shirou/gopsutil && make build_test
36 build_test_v3:
37 strategy:
38 matrix:
39 go-version: [1.16.x, 1.17.x]
40 runs-on: ubuntu-20.04
41 steps:
42 - name: Install Go
43 uses: actions/setup-go@v2
44 with:
45 go-version: ${{ matrix.go-version }}
46 - name: Checkout code
47 uses: actions/checkout@v2
48 - name: Build Test v3
49 run: |
50 cd v3 && make build_test
View as plain text