11name : Test
2-
32on :
43 push :
54 pull_request :
109 runs-on : ubuntu-latest
1110 steps :
1211 - name : Checkout code
13- uses : actions/checkout@v3
12+ uses : actions/checkout@v4
1413 - name : Set up Go
15- uses : actions/setup-go@v3
14+ uses : actions/setup-go@v5
1615 with :
17- go-version : ' 1.20'
18- cache : true
16+ go-version-file : " go.mod"
1917 - name : Install dependencies
2018 run : sudo apt-get install build-essential
2119 - name : Run Test
@@ -32,12 +30,12 @@ jobs:
3230 plugins : ${{ steps.set-matrix.outputs.plugins }}
3331 steps :
3432 - name : Checkout code
35- uses : actions/checkout@v3
33+ uses : actions/checkout@v4
3634 - id : set-matrix
3735 run : |
3836 echo "plugins=$(find plugins -mindepth 2 -maxdepth 2 -type d | sed 's/plugins\///' | awk 'BEGIN{printf "["} {printf "%s\"%s\"",sep,$0; sep=","} END{print ",\".\"]"}')" >> $GITHUB_OUTPUT
3937
40- plugins-test :
38+ plugins :
4139 needs : pretest
4240 runs-on : ubuntu-latest
4341 if : |
@@ -49,12 +47,11 @@ jobs:
4947 plugins : ${{ fromJson(needs.pretest.outputs.plugins) }}
5048 steps :
5149 - name : Checkout code
52- uses : actions/checkout@v3
50+ uses : actions/checkout@v4
5351 - name : Set up Go
54- uses : actions/setup-go@v3
52+ uses : actions/setup-go@v5
5553 with :
56- go-version : ' 1.20'
57- cache : true
54+ go-version-file : " go.mod"
5855 - name : Install dependencies
5956 run : sudo apt-get install build-essential
6057 - name : Run Test
@@ -67,15 +64,14 @@ jobs:
6764
6865 coverage :
6966 runs-on : ubuntu-latest
70- needs : [test, plugins-test ]
67+ needs : [test, plugins]
7168 steps :
7269 - name : Checkout code
73- uses : actions/checkout@v3
70+ uses : actions/checkout@v4
7471 - name : Set up Go
75- uses : actions/setup-go@v3
72+ uses : actions/setup-go@v5
7673 with :
77- go-version : ' 1.20'
78- cache : true
74+ go-version-file : " go.mod"
7975 - name : Download coverage
8076 uses : actions/download-artifact@v3
8177 with :
8985 COVERALLS_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9086 run : |
9187 go install github.com/mattn/goveralls@v0.0.11
92- goveralls -coverprofile=$(ls -1 coverage*.out | paste -sd "," -) -service=github
88+ goveralls -coverprofile=$(ls -1 coverage*.out | paste -sd "," -) -service=github
0 commit comments