|
12 | 12 | unit:
|
13 | 13 | strategy:
|
14 | 14 | matrix:
|
15 |
| - go-version: [1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x] |
| 15 | + go-version: [1.14.x, 1.15.x, 1.16.x, 1.17.x] |
16 | 16 | os: [ubuntu-latest, windows-latest, macOS-latest]
|
17 | 17 | env:
|
18 | 18 | OS: ${{ matrix.os }}
|
|
27 | 27 | uses: actions/checkout@v2
|
28 | 28 | - name: Test
|
29 | 29 | run: go test -race -tags fast -coverprofile unit.txt -covermode atomic ./...
|
30 |
| - - name: Clear report (unix) |
31 |
| - if: runner.os != 'Windows' |
32 |
| - run: | |
33 |
| - if [ "$RUNNER_OS" == "Linux" ]; then |
34 |
| - sed -i '/testutil\|trace\|test/d' unit.txt |
35 |
| - elif [ "$RUNNER_OS" == "macOS" ]; then |
36 |
| - sed -i '' '/testutil\|trace\|test/d' unit.txt |
37 |
| - fi |
38 |
| - shell: bash |
39 |
| - - name: Clear report (windows) |
40 |
| - if: runner.os == 'Windows' |
41 |
| - run: | |
42 |
| - (Get-Content unit.txt) -replace '^(testutil\|trace\|test).*$', '' | Out-File -encoding UTF8 unit.txt |
43 |
| - shell: pwsh |
44 | 30 | - name: Upload coverage to Codecov
|
45 | 31 | uses: codecov/codecov-action@v2
|
46 | 32 | with:
|
|
80 | 66 | - name: Checkout code
|
81 | 67 | uses: actions/checkout@v2
|
82 | 68 | - name: Test
|
83 |
| - run: go test -race -coverpkg=./... -coverprofile table.txt -covermode atomic ./test/table_test.go |
84 |
| - - name: Clear report |
85 |
| - run: sed -i '/testutil\|trace\|test/d' table.txt |
86 |
| - shell: bash |
| 69 | + run: go test -race -coverpkg=./... -coverprofile unit.txt -covermode atomic ./test/table_test.go |
87 | 70 | - name: Upload coverage to Codecov
|
88 | 71 | uses: codecov/codecov-action@v2
|
89 | 72 | with:
|
@@ -122,9 +105,7 @@ jobs:
|
122 | 105 | - name: Checkout code
|
123 | 106 | uses: actions/checkout@v2
|
124 | 107 | - name: Test
|
125 |
| - run: go test -race -coverpkg=./... -coverprofile ratelimiter.txt -covermode atomic ./test/ratelimiter_test.go |
126 |
| - - name: Clear report |
127 |
| - run: sed -i '/testutil\|trace\|test/d' ratelimiter.txt |
| 108 | + run: go test -race -coverpkg=./... -coverprofile unit.txt -covermode atomic ./test/ratelimiter_test.go |
128 | 109 | shell: bash
|
129 | 110 | - name: Upload coverage to Codecov
|
130 | 111 | uses: codecov/codecov-action@v2
|
@@ -164,10 +145,7 @@ jobs:
|
164 | 145 | - name: Checkout code
|
165 | 146 | uses: actions/checkout@v2
|
166 | 147 | - name: Test
|
167 |
| - run: go test -race -coverpkg=./... -coverprofile scripting.txt -covermode atomic ./test/scripting_test.go |
168 |
| - - name: Clear report |
169 |
| - run: sed -i '/testutil\|trace\|test/d' scripting.txt |
170 |
| - shell: bash |
| 148 | + run: go test -race -coverpkg=./... -coverprofile unit.txt -covermode atomic ./test/scripting_test.go |
171 | 149 | - name: Upload coverage to Codecov
|
172 | 150 | uses: codecov/codecov-action@v2
|
173 | 151 | with:
|
@@ -206,10 +184,7 @@ jobs:
|
206 | 184 | - name: Checkout code
|
207 | 185 | uses: actions/checkout@v2
|
208 | 186 | - name: Test
|
209 |
| - run: go test -race -coverpkg=./... -coverprofile connection.txt -covermode atomic ./test/connection_test.go |
210 |
| - - name: Clear report |
211 |
| - run: sed -i '/testutil\|trace\|test/d' connection.txt |
212 |
| - shell: bash |
| 187 | + run: go test -race -coverpkg=./... -coverprofile unit.txt -covermode atomic ./test/connection_test.go |
213 | 188 | - name: Upload coverage to Codecov
|
214 | 189 | uses: codecov/codecov-action@v2
|
215 | 190 | with:
|
|
0 commit comments